Wednesday, 24 February 2010

Enable debugging for _layouts files

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

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

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