This has popped up a few times in the SharePoint forums, so I thought I would pop a solution here...
When you receive an error in SharePoint (WSS or MOSS) you will get the canned 'Runtime Error'. This error is designed to not give out critical information to your users. You can view the real error by following these steps ...
Go into the web.config for this web site. It is typically located in the C:\Inetpub\wwwroot\wss\VirtualDirectories\
You should see several folders here. You need the folder for the port number your site is on. This is often the 80 folder. If you only have two, the 80 and another number, it is definitly the 80. The later would be for your Centeral Admin. There is no need to mess with this one.
Find the web.config and make a copy!!!!! Just incase you make a mistake you don't know how to fix. Name it something like web.backup.
Open the web.config file in notepad
change the following two lines
SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false"
to
SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false"
The "True" will give you the verbose details beyond the simple error codes.
and change ...
customErrors mode="On"
to
customErrors mode="Off"
Save the web.config!!!
Make sure you capitalize just like I did.
Do an IIS reset... re-run your page. You should see the real error.
You should put things back when you are done so that other end users don't see critical error information.
As a developer, this is often one of the first things I do. Errors are part of the development process and you might as well set this early. Do not leave this on for Production sites. Set the "Off" to "RemoteOnly" or "On".
Tuesday, July 1, 2008
Subscribe to:
Post Comments (Atom)


1 comments:
Thanks Dude!
Quite helpful...
Post a Comment