Microsoft Certifications Practice Tests:   Exam 70-506   Exam 77-881   Exam 70-583   Exam 70-642   Exam 77-882   Exam 70-680   
windows 8
 


ForumArticlesMicrosoft ExamsWindows 8 ArticlesWindows 8 NewsProduct Reviews



Resources » Microsoft Software » IIS & Web hosting


How to change .NET Framework version on IIS without restarting


Posted Date:     Category: IIS & Web hosting    
Author: Member Level: Silver    
Rating: 2 out of 52 out of 5Points: 50


If you try to change the .NET Framework version on an IIS website, it will prompt you to restart W3SVC service. In this article, I will explain how to change .NET version on IIS without restarting.


If you are here looking for the command prompt shortcut to change .NET Framework version on IIS without restarting IIS and don't want to read this full article, here is the format:







C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -s w3svc/881126637/root -
norestart


881126637 is the Meta ID of your website site. To learn more about this, read further.

When it is time to upgrade your website to a newer version of .NET, it is pretty straight forward to do it through the IIS Manager UI. However, the frustrating part is, it will restart the W3SVC service when you change the IIS version.

However, Microsoft has been nice to give us a warning that it is going to restart it and all your websites running on IIS will be down for few minutes. I believe it wouldn't have taken much longer to program it to integrate their own suggestion to the IIS Manager :-)

This is what IIS Manager will show if you attempt to change the .NET Framework version:

Change .NET Framework version on IIS without restarting warning

Text:

Changing the Framework version requires a restart of the W3SVC service.
Alternatively, you can change the Framework version without restarting the
W3SVC service by running: aspnet_regiis.exe -norestart -s IIS-Viirtual-Path

Do you want to continue (this will change the Framework version and
restart the W3SVC service)?



Now, Microsoft want us to go to the command prompt and type the suggested command. (I wish they had given another button there saying "click here open command command prompt!", if IIS Manager itself cannot run that command.)

The command we have to execute is pretty straight forward, but what is missing is the IIS-Virtual-Path. It took a while for me to figure out what exactly it is. I tried few times using the website name, virtual path etc, but later figured out we need to use the internal site id of the website/virtual path, which is a number

How to find IIS Site Id?


IIS 6 and older does not show the site id of the website in the UI. There are couple of ways to find site id.

You may use the aspnet_regiis -lk command will display all Site Ids, but it will not show the website name or path. So, if you have many websites, you will not be able to figure out what website each site id represent.

Another option is, right click on your website and choose the option All Tasks > Save Configuration To a File. This step will create a text file with all the meta information of the website. Open the file and look for the site id in the following format:

<IIsWebServer Location ="/LM/W3SVC/881126637"

Note down the number from the above line and use it with the aspnet_regiis command, as shown below:

aspnet_regiis -s w3svc/881126637/root -norestart


Change .NET Framework version on IIS without restarting

Remember to run the aspnet_regiis from the correct version of .NET version you want the website to be registered with.


Did you like this resource? Share it with your friends and show your love!




Related Resources:


Read related articles: IIS    .NET Framework    change .NET Framework    IIS without restarting    


Responses to "How to change .NET Framework version on IIS without restarting"
Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: Purpose of Microsoft IIS Developer Express web server
    Previous Resource: How to configure a website to use impersonation in IIS 7.0
    Return to Resources
    Post New Resource
    Category: IIS & Web hosting


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    (No tags found.)

    Subscribe to Windows resources by Email



    Awards & Gifts


    Silverlight 4 free practice test is now live!

    My Profile

    Online MembersFer
    More...

    Active Members
    TodayLast 7 Daysmore...


    Quick Links:Windows 8 beta
    Windows 8 Installation
    Windows 8 Features
    Google Plus
    Microsoft Office 365
    Microsoft Lync 2010
    Silverlight 5
    HTML 5
    Cloud Computing
    Rupee Symbol
    Internet Explorer 9
    Windows Azure

    RSS Feeds Resource Feeds
    Forum Feeds
    Job Feeds



    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.