Skip to main content

Thinking out aloud - Dave Hunter's SharePoint Blog

Go Search
Home
Blog
  

Locations of visitors to this page


 Useful Links

  Microsoft UK events
  SharePoint 2007 on CodePlex
  SharePoint Community Portal
  SharePoint User Group
  SharePoint Community Portal
  SharePoint Pedia
  SharePoint MSDN Forums
  SharePoint University
Home > Thinking out aloud - Dave Hunter's SharePoint Blog > Posts > Displaying ASP.NET Error Pages
My thoughts and findings on Microsoft Information worker technologies, including MCMS and SharePoint 2007 (MOSS).
Displaying ASP.NET Error Pages
When debugging errors with SharePoint 2007, you can have a hard time finding out what the actual error message is.  SharePoint displays the “An unexpected error has occurred”, but this isn't helpful.
 
You can wade through the SharePoint log files and find the actual error message.  This is time consuming and maybe tricky due to the amount of information written to the log.
 
You can modify the web.config so that you get the standard ASP.NET helpful error message.  You will need to:
 

1. Backup the web.config.
2. Open the web.config in notepad and change

<SafeMode MaxControls="200" CallStack="false"

to

<SafeMode MaxControls="200" CallStack="true"

3. You will also need to change the CustomErrors mode to "Off"

<customErrors mode="Off"/>

4. Save changes.

5. Perform an IISRESET (cmd > type "IISRESET" and hit enter).

You will no longer see the “An unexpected error has occurred” error page.  This helps during development, but during testing it's best to revert back to the SharePoint error pages so you can see how the production environment will look for an end user.

Hope this helps

  Copyright
This work is licenced under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 UK: England & Wales License
  Site Map

Comments

There are no comments yet for this post.

 Dave Hunter

I'm currently a Senior Consultant at Netstore 2e2. I specialise in Microsoft Information Worker technologies (especially MOSS, MCMS and .NET), with over 8 years of experience within this area of specialism. 

I have gained two certifications for MOSS and WSS and look to complete the full certification track soon.

View Dave Hunter's profile on LinkedIn

  Subscribe in a reader


 Latest Posts

I’m attending the first ever SharePoint Saturday in the UK31/08/2010 19:43
I’ve re-joined CIBER UK31/08/2010 19:26
I’ve been Awarded a MVP for SharePoint01/04/2010 19:49
SharePoint 2010 Training on Microsoft E-Learning15/03/2010 17:56
SharePoint UK User Group - Thursday 27th August London Meeting25/08/2009 17:56
CAML Query that filters on the current user23/07/2009 17:50
Microsoft Ramp Up Free SharePoint Developer Training22/07/2009 20:59
How To: Change a SharePoint Application Pool Programmatically07/07/2009 18:08
SharePoint Forums Topping 100 Answers06/07/2009 12:29
Find out the SharePoint Internal Name for a Column or Site Column28/05/2009 09:56
1 - 10 Next