Monday, 14 April 2008

Unknown Error - Revealing the true source of the error

SharePoint has the production friendly, but definetely developer unfriendly page - Unknown error when an error is thrown. My usual way to finding the error was to look at the Logs found in the 12 hive, however it looks like there is an easier way to do this:

The Sharepoint web.config is abstracting this message from the user. Find the web.config for the site you normally use as your development site.

<safemode callstack="false"> and change it to CallStack="true"
Set <customerrors mode="On"> to mode="Off"
Set <compilation batch="false" debug="false"> to <compilation batch="true" debug="true">

You will now get a hopefully less cryptic error message...