ASP.NET 2.0, 1.1 Sharing Environments: Careful with your web.configs

We recently got a pretty typical question around ASP.NET’s 2.0 release and its influence on IIS installations using ASP.NET 1.1.  The first thing you will notice when you have a failure that is caused by mismatches…

The question is:

In testing ASP.NET 2.0, you will have an issue when the user has an ASP.NET 2.0-style web.config sitting in the root of their website, and a 1.1 app installed in a virtual directory.

It appears that the 1.1 runtime is looking at the 2.0 web.config in the parent directory, and trying to parse this as if it were a parent 1.1 web.config. When I remove the web.config at the root, the error goes away.


"Is there a way around this behavior? If not – it would seem that we cannot support Windows Shared Hosting apps on sites which have an ASP.NET 2.0 app installed at the root of the website."

After talking with those in the “know” we have found that the following:  (By Design)

We do not support a v1.1 application having a web.config file from v2.0 in the config hierarchy, as you have in this case:

/web.config contains v2.0 settings

/app is mapped to v1.1

I recommend following the guidance from the URL below…

Learn ASP.NET 2.0 & IIS 6.0

"The solution is, simply, to *not* create an Application in the root.  The root should remain un-configured, as a container for all Applications, and never be used as an Application itself."

This is interesting stuff.  I hope it helps…

WARNING:  ChrisAd has not tested nor played with this solution.  Try at your own Risk!

P.S.  Thanks to Michael Johnson, Hosting Evangelism at Microsoft, for bringing this question to the Development team. 

No Comments