How do you work out the IIS Virtual Path for an application?

Viewed 37335

When I try to change the ASP.NET version to v4 on IIS 6, I receive the following warning:

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)?

How do I work out IIS-Virtual-Path?

I have tried the obvious paths i.e.:

aspnet_regiis.exe -norestart -s "/WebSites/Extranet/AppName"

Where WebSites is the name of the folder in IIS, Extranet the name of the root app and AppName the name of the Virtual Directory application I am trying to change.

Thanks!

Edit:

How do I work out the virtual path for the Auth virtual directory in following IIS6 setup:

alt text
(source: imgbag.com)

I have tried:

aspnet_regiis.exe -norestart -s "/Web Sites/Extranet/Auth"

aspnet_regiis.exe -norestart -s "Auth"

I get:

Installation stopped because the specified path (WhateverIPutIn) is invalid.

6 Answers

To change Framework version without restarting W3SVC: Run aspnet_regiis.exe -norestart -s IIS-Virtual-Path

aspnet_regiis.exe should be run from %SystemRoot%\Microsoft.NET\Framework(required dotnet version) eg C:\WindowsMicrosoft.NET\Framework\v4.0.30319

IIS-Virtual-Path is: W3SVC/(WebsiteID)/root[/AppName] Where (WebsiteID) is the identifier as listed in IIS (see Diego C's image above) and [/appname] is an optional virtual directory below your website. (eg W3SVC/1234567890/root/dotnetnuke)

  1. Open a command prompt
  2. Navigate (CD) to C:\WindowsMicrosoft.NET\Framework\v4.0.30319
  3. Execute aspnet_regiis.exe -norestart -s “W3SVC/1234567890/root/dotnetnuke”
Related