This project is read-only.

Hierarchical Virtual Directories

Oct 18, 2010 at 10:46 PM

Is there a way to create nested virtual directories with the same name.  I can do this manually and it seems that this functionality is missing or broken in the current extension pack.  I would like to create a website with the following hierarchy:



-- Folder 1\

---- Virtual Directory (named v1.0)

-- Folder 2\

---- Virtual Directory (named v1.0)

-- Virtual Directory (named v1.0)


Again, I am able to accomplish by manually going into IIS (6 and 7) and adding the website, at the root, and created virtual directories under the nested folders.  Currently only the root gets a virtual directory.

Oct 19, 2010 at 12:24 PM

Can you post a screenshot of your configured IIS6 website and the script you are trying to use.



Oct 20, 2010 at 4:33 PM


TaskAction="Create" Name="%(WebSite.Name)"
Force="true" />

Name="%(VirtualDirectory.Name)" Properties="%(VirtualDirectory.Path)"/>

Here's an example of the paths:


Here's a screenshot:

Oct 26, 2010 at 10:27 AM


I've not been able to create a virtual directory under a child folder without making the parent folder a webdirectory too. I get an error that the system cannot find the path. This is either a flaw in the way I'm doing it or in the Task. I'm investigating further.

This works for me

      <MSBuild.ExtensionPack.Web.Iis6Website TaskAction="Create"  Name="Subsite1" Force="true" Properties="AspEnableApplicationRestart=False;AspScriptTimeout=1200;ContentIndexed=False;LogExtFileFlags=917455;ScriptMaps=;;SecureBindings=;ServerAutoStart=True;UseHostName=True"/>
      <MSBuild.ExtensionPack.Web.Iis6VirtualDirectory TaskAction="Create" Website="Subsite1" Properties="Path=D:\Inetpub\Sites\Subsite1"/>
      <MSBuild.ExtensionPack.Web.Iis6VirtualDirectory TaskAction="Create" Website="Subsite1" Name="V1.0"/>
      <MSBuild.ExtensionPack.Web.Iis6VirtualDirectory TaskAction="Create" Website="Subsite1" Name="SubSubSite1" DirectoryType="IIsWebDirectory"/>
      <MSBuild.ExtensionPack.Web.Iis6VirtualDirectory TaskAction="Create" Website="Subsite1" Parent="/ROOT/SubSubSite1" Name="V1.0"/>