Archive for February, 2011

Enabling full stack dumps (detailed error messages) on ASP.NET and SharePoint

When an error occurs within SharePoint, the application by default will not display a detailed error message to the end user (this is done for security reasons).  When you’re actively configuring/developing your SharePoint platform, it is sometimes useful to display detailed error messages.  

Here are the steps to do it:

You must edit several “web.config” files:

1. Each SharePoint web application you created will have its own “web.config”.  You can find these in the respective folders under “C:\inetpub\wwwroot\wss\VirtualDirectories”.

In the XML section <system.web> you have two changes to make:               

CHANGE #1:  <customErrors mode=”Off” />

( This is normally set to “On” so change it to “Off”)           

CHANGE #2:  <compilation batch=”false” debug=”true”>

(The ‘debug’ attribute is normally set to “false” so change it to “true”)
               
In the XML section <SharePoint> you have a single change to make:
CHANGE #3:  <SafeMode MaxControls=”200″ CallStack=”true”…>

(The ‘CallStack’ attribute is normally set to “false” so change it to “true”)

Remember, you must make these THREE changes in EACH of the web.config files found in the folder for each of your web applications!

2. You must also change the “web.config” that is global to SharePoint (ie:  applies to all web applications).  This file is located here:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config

In the XML section <system.web> you have a single change to make:
CHANGE #1:  <customErrors mode=”Off” />

(This is normally set to “On” so change it to “Off”)

*** Thanks go to David Biersach for providing detailed background information for this post. ***

Advertisements

Fixing “Error in the Site Data Web Service” crawl error in SharePoint 2010

I ran into the following issue with search in SharePoint Server 2010 – the crawl job was failing to index the entire site collection. 

Crawl log error:  Error in the Site Data Web Service. (Value does not fall within the expected range.)
ULS log error:   “Error from SharePoint site: Data is Null. This method or property cannot be called on Null values.”

If you turn your diagnostic logging to Verbose, you might see the following error in the ULS log file:

GetSite fail. error 2147755542, strSiteUrl

I was able to fix the problem with the following steps:

1) Ran stsadm -o export command with -includeusersecurity switch to export the site.

2) Additionally, created a full backup of the site (just in case I needed to roll back) using stsadm -o backup command.

3) Deleted the original site collection.

4) Re-created a blank site collection with the same URL and using the same site template.

5) Ran stsadm -o import command with -includeusersecurity switch to import the site.

6) In the Search service application, deleted the original content source containing the problem site collection URL and re-created it with a different name.

7) Reset search index and run a full crawl job.


RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 353,732 hits