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
A SysAdmin's Guide to Change Management
 In the first in a series of monthly articles, ‘Confessions of a Sys Admin’, Matt describes the issues... Read more...

Exchange: Recovery Storage Groups
 It can happen at any time: You get a request, as Admin, from your company, to provide the contents of... Read more...

Build Your Own Virtualized Test Lab
 Desmon explains the fundamentals of building a test lab for Windows servers and Enterprise applications... Read more...

Rendering Hierarchical Data with the Treeview
 It sometimes happens that Web Server controls that visualize data don't quite fit with the way that... Read more...

SQL Server 2008: Performance Data Collector
 With Performance Data Collector in SQL Server 2008, you can now store performance data from a number of... Read more...