Damon Armstrong

Caffeine Induced Tirades about .NET and Life
And don't forget to check out my latest Simple-Talk articles
Add to Technorati Favorites      Add to Google     

Displaying Debugging Info for SharePoint Errors in Your Browser

Published Thursday, May 17, 2007 12:28 PM

SharePoint does a good job of hiding errors from users.  Out of the box, unhandled errors in SharePoint result in a fairly non-descript page that says "An Error Occurred" (or something to that effect).  Although a good practice for your end-users, it's pretty annoying when you're trying to get a piece of code working or a configuration setting correct.  Here's how you can display debugging information in your browser:

  • Find the following line in your web.config:

    <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
  • Change the CallStack attribute to true
  • Change the AllowPageLevelTrace to true
  • Find the following line in your web.config:

    <customErrors mode="On" />
  • Change the mode to "Off"

The next time you have an error, it displays the familiar ASP.NET error information page with exception details and the callstack information.  Much less frustrating than a blasé error message.

by Damon
Filed Under:

Comments

No Comments
You need to sign in to comment on this blog

















<May 2007>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789
Using Powershell to Generate Table-Creation Scripts
 For all of us who learn best by trying out examples, Bob Sheldon produces a PowerShell script file for... Read more...

Configuring Exchange Server 2007 to Support Information Rights Management
 In Exchange Server 2007, Information Rights management is easy to set up once you have set up the... Read more...

SQL Response: The dim sum interview
 Richard Morris met David and Nigel of the SQL Response team, in a dim sum Restaurant in Cambridge. They... Read more...

Why This SQL Server DBA is Learning Powershell
 Ron describes how he decided to study Powershell as a single scripting system to automate all the... Read more...

Using Covering Indexes to Improve Query Performance
 Designers of database systems will often assume that the use of a clustered index is always the best... Read more...