SharePoint 2007 site is Blank in Internet Explorer 8

I recently installed SharePoint Server 2007 on my Windows 7 64 bit development machine, and after setting up my first Web App and Site Collection my test site would not load in Internet Explorer 8 or in SharePoint Designer 2007, although it would work fine in Firefox.  Now the screen would load blank in IE8 after asking for authentication about 3 times.  In SPD2007, it would ask for authentication seemingly endlessly until I just hit cancel, and it would never load the site.

At first, after asking and searching around, I thought that the loopback issue with IE8 may have been causing the problem, but even after double checking everything in that area I still had the same issue.  Also, I wasn’t getting the 401.1 screen, as is usually the case with the loopback issue.  If you are having that problem, then you should check out this post

Finally, a colleague of mine, Phillip Wilkins, told me that he fixed the blank screen issue by enabling Windows Authentication in IIS.  That fixed it!  Thanks, Phillip.

Here are some quick instructions with screenshots to show you what I did:

  1. Open IIS Manager (I do this: Click Start, type "iis," and then click enter).
  2. Click on Authentication under the IIS section.
  3. If Windows Authentication is Disabled, then click on it and then click on Enable under the Actions menu on the right.  You should now see that Windows Auth is enabled, and hopefully this has fixed your problem.
     

Missing “Create or extend Web application” Link in SharePoint Central Administration

I recently did a clean install of Windows 7 64 bit on my development machine.  I used Bamboo Solutions’ WSS on Vista tool to install SharePoint Server 2007 on it; however, when I navigated to Central Administration there was no “Create or extend Web application Link” there.

Well, at first I thought it may be a permissions issue, but everything seemed to be in place there.  I also made sure to right-click Central Administration from the Start Menu to “Run as administrator,” but that didn’t fix it either.

Then I realized that I hadn’t installed Service Pack 2 for SharePoint Server.  Microsoft suggested that I install Service Pack 2 for WSS 3.0 first, which I did, and that fixed the issue.  Then I went ahead and installed The 2007 Microsoft Office Servers Service Pack 2, and everything is running great now.

Technorati Tags: ,,,,,,,,,,,,,,

Windows Live Tags: Create or extend Web Application,Service,WSS,MOSS,SharePoint,Central,Administration,Bamboo,Vista,Server,Pack,Microsoft,Office,Servers,Solutions

stsadm –o uninstall – Don’t do this!

Well, at the risk of sounding like a complete idiot, I’ve chosen to share my experience with you in order to help save you from some problems later.  I needed to force an uninstall of a feature from my development machine.  Well, this isn’t an stsadm command that I have had to use much, so I didn’t remember exactly what the command was.  The command is “uninstallfeature", by the way.  However, I was thinking that it was “uninstall”. 

So, at this point I thought I’d type in “stsadm –o uninstall” and hit enter so that it would tell me what arguments I needed to include, as you can see in the below screenshot with “addsolution".

 

Obviously, this isn’t the best practice for how to find the arguments for an stsadm command; however, I knew that it would work if I was missing any arguments (see “Important Note” below).,

The Big Problem

Now, here is the BIG problem.  Since I had the wrong command (“uninstall” instead of “uninstallfeature”), I got to enjoy a wonderful learning experience.  The stsadm command “uninstall” doesn’t have to have any arguments, so if you type it in and press enter, then it will just start to run.  And do you know what it does?  That’s right:  It uninstalls SharePoint from your machine WITHOUT asking for any confirmation.  Lesson learned.

Important Note

By the way, to avoid this problem altogether you should always do what I did not do: put “–help” after any command that you wish to see the parameters for.  For example: stsadm –o uninstall –help

Technorati Tags: ,,,,,,,
Windows Live Tags: moss,wss,feature,development,SharePoint,stsadm,uninstall,uninstallfeature

SharePoint Designer—Custom Forms getting Invalid Data Error

Ever gotten an error like the following when trying to insert an item into a SharePoint list using a custom built form?  See “The Fix” information below the error message text to see an explanation on how to fix this IF the problem is due to using a control, such as a DropDownList or ListBox, to pull data from one list and send it into a Lookup Column in another list.

Error Message:

Server Error in ‘/’ Application.
——————————————————————————–

Invalid data has been used to update the list item. The field you are trying to update may be read only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Invalid data has been used to update the list item. The field you are trying to update may be read only.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[COMException (0x80020005): Invalid data has been used to update the list item. The field you are trying to update may be read only.]
   Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0
   Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +203

[SPException: Invalid data has been used to update the list item. The field you are trying to update may be read only.]
   Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +250
   Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents) +1026
   Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents) +182
   Microsoft.SharePoint.SPListItem.Update() +94
   Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteInsert(IDictionary values) +237
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +86
   System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +272
   System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +676
   System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e) +113
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

——————————————————————————–
Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

The Fix

I have found that when I am using a control, such as a DropDownList, to pull data from one list and send it into a Lookup Column on the list that I am inserting data into, that the problem lies in the “DataValueField” attribute.  Lookup Columns always refer to the items that they lookup by those items’ IDs, and not by their actual text value from the “Title” field (or whatever field you are looking up on).  So when setting a DropDownList’s attributes for this purpose follow these guidelines:

<asp:DropDownList runat="server" ID="MyListDropDownList" DataSourceID="spdatasource2" DataValueField="ID" DataTextField="Title" SelectedValue='<%# Bind("MyListLookupColumn") %>’/>

  • ALWAYS set “DataValueField” to ID.
  • Set “DataTextField” to the actual field containing the text that you want to be displayed in the DropDownList and in the List that you are inserting into.
  • Set “DataSourceID” to the Id of whatever data source you are using to connect to the lookup list.
  • Set “SelectedValue” to bind to the field in the list that you are inserting the data into.