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:

 

Root\

-- 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.

Coordinator
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.

Thanks

Mike

Oct 20, 2010 at 4:33 PM

 

<MSBuild.ExtensionPack.Web.Iis6Website
TaskAction="Create" Name="%(WebSite.Name)"
Force="true" />

<MSBuild.ExtensionPack.Web.Iis6VirtualDirectory
TaskAction="Create"
Website="%(WebSite.Name)"
Name="%(VirtualDirectory.Name)" Properties="%(VirtualDirectory.Path)"/>

Here's an example of the paths:

C:\Inetpub\Sites\Subsite1\v1.0
C:\Inetpub\Sites\Subsite1\SubSubSite1\v1.0
C:\Inetpub\Sites\SubSite2\v1.0

Here's a screenshot: http://cid-66e5fcb98f941ac7.photos.live.com/self.aspx/Public/IIS6.jpg.

Coordinator
Oct 26, 2010 at 10:27 AM

Hi

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=;ServerBindings=:80:www.subsite1.com;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"/>

Mike