November 3, 2009

Display Full Error Description at Runtime in SharePoint 2007

Many times in SharePoint you will stuck at default error page. It says “An unexpected error has occurred” for all kind of errors.


This is very annoying part of SharePoint.

In such case, as a developer or professional, you have two possible ways to find out the exact error.

1) Go to Start > Control Panel > Administrative Tools > Event Viewer and check the internal error message, coz SharePoint itself logs all errors here.

Or

2) If you want to see the error on screen, you can edit configuration settings mentioned below.



• Navigate to web.config file of your SharePoint site.

In Windows Explorer, browse to the following folder

c:\inetpub\wwwroot\wss\virtualdirectories\site directory\site port number\

• Open web.config file in visual studio or notepad.

• Find word ‘CallStack’ and change status false to true

• Again find ‘CustomErrors ’ word and change mode On to Off

• Save and close the web.config file.

Refresh the error page, you will see original error message in screen instead of "An unexpected error has occurred" page.

If you have any questions you can reach out our SharePoint Consulting team here.

By: Piyush

No comments:

Post a Comment