Typical Web.config Tweaks

These are some web.config modifications that I typically need at my fingertips.  After all, who can memorize all this stuff?

Allow scripts to be embedded in asp pages.

        <PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />

Allow asp scripts to access external libraries

In the following case, SharePoint Taxonomy libraries:

<add assembly="Microsoft.SharePoint.Taxonomy, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

Create a reference to custom web service

Each method in the web service becomes a service “method”.

  <location path="_layouts/SPUtilities/SPservice.asmx">
          <add name="HttpPost" />

Error reporting

Show a detailed error (rather than the generic sharepoint error).


<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">


<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">


<customErrors mode="On" />


<customErrors mode="Off" />

Leave a Reply

Your email address will not be published. Required fields are marked *