Tuesday, February 21, 2006

Running Asp.net 2.0 and 1.1 on IIS 6.0

From John Brennan's Blog
Configuration tip: running ASP.NET 2.0 apps on IIS 6.0

This is something I came across this morning when deploying an ASP.NET 2.0 application. I installed .net framework beta 2 on to the box. I then configured the site through IIS to use .NET 2.0 version of the framework. (For those who aren't aware of this, .NET 2.0 inserts a new tab into your web site properties in IIS. This tab which is called "ASP.NET" enables you to set the version of the framework under which your application will run. It also has a few other cool features such as editing your web.config file through the UI).
Anyhow deployed the app and an hour later I got this error saying: ASP.NET Application Service is unavailable. First thing was check the event log on the IIS box which had a really informative error message:
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. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.
The solution from TechNet site was to create a seperate application pool for .NET 2.0 applications. My existing v1.1 apps continue to run in the defaultAppPool while my .NET 2.0 app now uses my AspNet2AppPool. The steps involved were:
A. To create a new Application Pool in IIS 6.0
Open the IIS management console and expand the local computer by clicking the plus sign.
Right-click the Application Pools folder, point to New, and then click Application Pool. The Add New Application Pool dialog box appears.
Enter the new pool name in the Application pool text box, and then click OK.
B. To assign my ASP.NET application to the new Application Pool
Open the IIS management console, expand the local computer by clicking the plus sign, and navigate to the folder that contains the ASP.NET application.
Right-click the application and then click Properties. The application's properties dialog box appears.
On the Directory tab, select the desired pool designation from the Application Pool list.
Further information available at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconfiguringaspnetapplicationforaspnetversion.asp
posted on Thursday, October 27, 2005 9:22 AM by jbrennan