Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change asp.net version in iis6.0

Tags:

asp.net

iis-6

We have Windows Server 2003 R2 Standard Edition in our production server. We have more live applications on that server written in ASP.NET 2.0.

We have installed .NET Framework 4.0 on our server.

I have a sample ASP.NET 4.0 application and I created a sample website in IIS 6.0. Now I want to change the ASP.NET version to 4.0.

During that change I have received an warning message:

"changing the framework requires restart of w3svc service. alternatively you can change the version with out restarting the w3svc service by running:aspnet_regiis.exe -norestart -s iid-virtual-path. do you want to continue(this will change the framework version and restart the w3svc service)"

My question is, if I changed the version to 4.0 (for my sample website only), is that going to affect the existing live applications? Those applications are running ASP.NET 2.0.

like image 921
user746219 Avatar asked May 10 '11 06:05

user746219


1 Answers

If you are just changing the ASP.NET version via the new site's properties ASP.NET tab then the changes will only be applied to that site.

What you must ensure is that you don't try to run ASP.NET 2.0 and ASP.NET 4.0 applications in the same application pool. If you do then you'll encounter this error:

alt text

You'll also see this tell-tale event in the Application Event log:

Event Type: Error
Event Source:   ASP.NET 2.0.50727.0
Event Category: None
Event ID:   1062
Date:       12/01/2011
Time:       12:31:43
User:       N/A
Computer:   KK-DEBUG
Description:
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.

Create a new application pool for your new ASP.NET 4.0 application (you can do that by cloning an existing pool):

enter image description here

Then assign your new ASP.NET web application to this pool on its property pages:

enter image description here

like image 178
Kev Avatar answered Sep 30 '22 05:09

Kev