Wednesday, 24 February 2010

Enable debugging for _layouts files

I wanted to see the ASP.net error for files in a subdirectory to _layouts folder. So I created a web.config in the subfolder with this content:


<configuration>
<sharepoint>
<safemode maxcontrols="200" callstack="true" directfiledependencies="10" totalfiledependencies="50" allowpageleveltrace="false">
<pageparserpaths>
</pageparserpaths>
</safemode>
</sharepoint>
<system.web>
<compilation batch="false" batchtimeout="600" maxbatchsize="10000" maxbatchgeneratedfilesize="10000">
<httphandlers>
<add type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" path="*.aspx" verb="*">
</httphandlers>
<customerrors mode="Off">
</SYSTEM.WEB>
</configuration>

Save the file and your ASP.Net error messages will appear.

No comments: