When an ASP.NET application is started it processes the web.config file. Doing so it is combined with all web.config files found up in the tree of virtual directories. Suppose I have a website located at www.mikeglaser.com and a w00t app like www.mikeglaser.com/w00t. When the application is loaded by the web server the web.config of the root website is read as well. Even when the physical path does not have a tree structure at all. Luckily it reads the highest file in rang first, so if you want to change settings for the app all settings made in the root are overruled. Things get worse when an ASP.NET 1.1 app enters the stage. This will also try to process all files named web.config up in the virtual directory tree, regardless of their intended framework version. The real bad thing is that ASP.NET does not understand an ASP.NET 2.0 config file. The latter happened to me while installing SharePoint 2007 on a production server running several 1.1 apps.
After searching the Net I ran in some strange post of Microsoft. How to: Modify Configuration Settings for an Application to Coexist with Windows SharePoint Services. This post doesn’t work at all and is intended for WSS v2. However this post is released in the WSS v3 documentation. Shame on you MS.
So it was up to me to solve this problem. I changed the ASP.NET configuration settings to use ASP.NET 2.0 as it ASP.NET version. This way all settings in the web.config of SharePoint are now understood by my w00t app.
The only part left to do is add the lower statements to the web.config of the web application
<trust level="Full" originUrl="" />
<remove name="PublishingHttpModule" />
<pages enableSessionState="true" />
This way the app will be fully trusted, except sessions and resolve a small error which will be added to the eventlog. For complete details about this error, browse to Unable to connect publishing custom string handler for output caching of Steven Van de Craen
Maybe it wasn’t a good idea to install SharePoint on a production machine without testing it, but you must dare to live. By the way, SharePoint and all apps works like a charm.