Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

iis-6

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.

like image 452
joshcomley Avatar asked Nov 26 '09 15:11

joshcomley


People also ask

How do I convert virtual directory to application in IIS?

In IIS Manager, expand the node for the local computer and then expand the Sites folder. Right-click the folder that you want to convert to an application and then click Convert to Application. The Add Application dialog box is displayed. Click OK.

What is the difference between virtual directory and application in IIS?

Virtual directories and applications are now separate objects, and they exist in a hierarchical relationship in the IIS configuration schema. Briefly, a site contains one or more applications, an application contains one or more virtual directories, and a virtual directory maps to a physical directory on a computer.

What is the default folder location for an IIS virtual directory?

NET, the projects are created at the default web site location, e.g. c:\inetpub\wwwroot\myapp.

What is virtual directory in IIS How do you create it?

A virtual directory is a directory name that you specify in IIS and map to physical directory on a local server's hard drive or a directory on another server (remote server). You can use Internet Information Services Manager to create a virtual directory for an ASP.NET Web application that is hosted in IIS.


2 Answers

I solved it. I had to use:

aspnet_regiis -lk to get a list of the folders in "IIS" format

Then I do something like:

aspnet_regiis.exe -norestart -s "W3SVC/1234567/root/AppName"

like image 59
joshcomley Avatar answered Sep 26 '22 15:09

joshcomley


My problem running aspnet_regiis -lk was that I got an incomplete list of IDs and also I didn't know which ID corresponded to the Website i wanted to work on.

An easier way to find the IDs for your websites is by clicking on the "Website" node (folder) in IIS as in this picture. On the right side you should see a list of all websites with their "Identifier"s, State, IPs and ports.

Image showing IDs

like image 21
Diego C. Avatar answered Sep 26 '22 15:09

Diego C.