简体   繁体   中英

why can i run two different versions of dot net framework from same app pool

yes, that is right. i have one app pool that is being used by two different versions of the dot net framework. everything that i've been reading has indicated that this is not possible.

for some more background, i am running windows 2003 sp2 and iis 6.

i have a website that is running microsoft cms under dot net 2.0. This website has a virtual directory where i'm running an mvc site that is running under dot net 4.0.

i can view the cms pages under www.mysite.com/... i can view the mvc pages under www.mysite.com/mvc/...

the issue is that when we deploy to another server things stop working and we are required to have two different app pools. I'm wondering if anyone else has a similar issue or whether i should be cloning and distributing this VM as a freak of the computer world?

You actually are not running two different versions of the dotNET framework. This is a common misunderstanding in that the setting for the app pool is actually just telling it which version of the dotNET CLR to use. The following article explains this in excellent detail:

http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx

Also, it is possible that if you are having trouble getting applications to run that targets a newer Framework, that it is not properly registered with IIS. In this case, you would need to manually register the newer Framework installation with IIS. To do so, login as the administrator on the IIS server or open a command prompt using RunAs to run with admin privileges. Then go to the following path:

C:\\Windows\\Microsoft.NET\\Framework

Then look in that folder and find the newest installed version of the Framework (should currently be v4.0.30319). Go into that folder and within it you should see ASPNET_REGIIS.EXE. Once you confirm that, then run this command line app with the "-i" parameter to correctly register the more recent version of the framework with IIS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM