Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install ASP.NET 4.0 alongside ASP.NET 2.0 on IIS6

I've read where you create a new application pool, one for 2.0 sites and one for 4.0 sites. But there is no option I see when creating a pool to configure the framework.

My problem is I have several 2.0 sites running as the Default Web Site. I added a WCF 4.0 service under a new virtual directory and set the framework to 4.0. I also put it in a separate app pool.

Now, I can only get one working at a time. Either the 2.0 sites or the 4.0 site. I get:

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.

Is it possible to do this under IIS6 and Windows Server 2003?

like image 235
ScottG Avatar asked Sep 02 '10 15:09

ScottG


2 Answers

To clarify: Each app pool binds to the .NET framework of the first web site that uses it, in order of application startup. That first site will run fine, but all other sites will be restricted to the same app pool. You need at least one app pool per framework version; and in my experience, the most robust setup is one app pool per application - this way, you can switch framework versions without worrying about other applications, and you can kill individual applications through task manager when the need arises.

like image 86
tdammers Avatar answered Nov 07 '22 17:11

tdammers


The App Pools don't need configuring, just make sure the 2.0 sites are running as one, and the 4.0 site running as another.

like image 37
cjk Avatar answered Nov 07 '22 16:11

cjk