Restart one virtual directory through command line without restarting IIS service

How to work out IIS-Virtual-Path and how you can restart one virtual directory through command line without restarting IIS serviceType - inetmgr on run
Once Internet Information services page opens

Click web sites - you will find Identifier ID w.r.t different websites. and the same Identifier ID will work for the virtual directory added to the sites.

Lets say under default website, "test" a virtual directory added and you want to change the framework version and restart the service for that only.

so for default website Identifier ID is 1
command will be aspnet_regiis.exe -norestart -s "W3SVC/1/root/test"
and you need to execute this command in command prompt inside framework directoy
like  C:\Windows\Microsoft.NET\Framework\v4.0.30319>
aspnet_regiis.exe -norestart -s "W3SVC/1/root/test" then enter

If you want to restart the default web site only then command will be 
C:\Windows\Microsoft.NET\Framework\v4.0.30319>
aspnet_regiis.exe -norestart -s "W3SVC/1/root/"
then enter

That's it
 
You may also like : Skype group contacts are not showing in Ubuntu 14.4

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.