When Web Parts break Web Part Pages
One of the most frustrating things with WSS is the feeling that you’re not in control.
You work hard to develop a web part, have it deployed, and feel a surge of pride when it’s being used… but the day it breaks is the day you’re called on at the 11th, against the clock, to fix it. This is just when you don’t want to be staring at a Web Part Page that has an error, but doesn’t tell you where.
So the thing to do is to tell WSS to give us the error message.
To do this, simply edit the web.config file that applies to the site that the Web Part Page is on.
Apply the following XPATH logic to web.config to see the full Sharepoint error message:
//configuration/Sharepoint/SafeMode[attribute::CallStack='true']
Apply this if you haven’t yet configured the web.config to allow you to see error messages:
//configuration/system.web/customErrors[attribute::mode='Off']
If you also wish to see the form posted and environmental values of the HTTP request, then you can also modify your machine.config file as such:
//configuration/system.web/trace[attribute::enabled='true']
And for those of you who want the easy way out, you can access the Web Part Maintenance page by appending the following to the querystring of the Web Part Page:
Contents=1
2 Comments, Comment or Ping
bob
Dude your post is confusing and unusable. Web.config file is of type XML and you need to mention the exact location and parent tags where to add your codes.
Sep 12th, 2005
DavidK
The web.config file in question is the one that pertains to the location where WSS is installed. As you could install it to a non-default location I haven’t included the path. The default path would be C:\Inetpub\wwwroot\web.config though.
And yes, web.config is an XML file. Specifically following a schema Microsoft have for IIS applications. The instructions above are formatted as XPath queries, if you are familar with XPath then locating and changing these values is easy. You can find more on XPath here: http://www.w3.org/TR/xpath
Sep 22nd, 2005
Reply to “When Web Parts break Web Part Pages”