Software Architecture -Error – IIS running for ASP .Net 2.0 and ASP .Net 4.0

August 10, 2010

Environment: IIS + ASP .Net 2.0 / 4.0

Problem Definition:
Suppose you have IIS running for ASP .Net 2.0 and ASP .Net4.0 , some application are running on ASP .Net 2.0 , so when a new application is deployed on ASP .Net 4.0, Application based on ASP .Net 2.0 will close with following message.

Server Application Unavailable

Windows Event log will show details as:

It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

Solution:
When you run IIS 6.0 in worker process isolation mode, you can separate different Web applications and Web sites into groups known as application pools. An application pool is a group of one or more URLs that are served by a worker process or set of worker processes. Any Web directory or virtual directory can be assigned to an application pool.

So solution is to create separate application pool for each version of ASP .Net .
Secondly, select separate application pool in each web directory / web application configuration. This will solve the above issues.

References:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/67e39bd8-317e-4cf6-b675-6431d4425248.mspx?mfr=true
http://technet.microsoft.com/en-us/library/cc757073(WS.10).aspx

Advertisements