title: Azure Dev Ops Configuring an IIS 3rd level Site
body: <p>I am trying to configure an IIS Web Application In Azure Dev Ops / VSTS which has a website at level 3, for example</p>
  
  <p>Sites/Applications/payroll-forms/hub-manager</p>
  
  <p>Applications is a Website
  payroll-forms is a was a virtual directory but is now an Application
  hub-manager is a application</p>
  
  <p>Here is my Variables and YAML</p>
  
  <pre><code>Configuration type : IIS Web Application
  Website Name : applications
  Virtual Path : '/payroll-forms/hub-manager'
  
  
  steps:
  - task: IISWebAppManagementOnMachineGroup@0
  displayName: 'IIS Web App Manage'
  inputs:
    IISDeploymentType: '$(Parameters.IISDeploymentType)'
    WebsiteName: '$(Parameters.WebsiteName)'
    WebsitePhysicalPath: 'f:\Websites\Applications'
    AddBinding: '$(Parameters.AddBinding)'
    Bindings: '$(Parameters.Bindings)'
    CreateOrUpdateAppPoolForWebsite: true
    AppPoolNameForWebsite: Applications
    DotNetVersionForWebsite: v2.0
    PipeLineModeForWebsite: Classic
    ParentWebsiteNameForVD: '$(Parameters.WebsiteName)'
    VirtualPathForVD: '$(Parameters.VirtualPathForApplication)'
    ParentWebsiteNameForApplication: '$(Parameters.WebsiteName)'
    VirtualPathForApplication: '$(Parameters.VirtualPathForApplication)'
  PhysicalPathForApplication: 'F:\Websites\Applications\payroll-forms\hub-manager'
  AppPoolName: '$(Parameters.AppPoolName)'
  
  steps:
  - task: IISWebAppDeploymentOnMachineGroup@0
  displayName: 'IIS Web App Deploy'
  inputs:
    WebSiteName: '$(Parameters.WebsiteName)'
    VirtualApplication: 'hub-manager'
    TakeAppOfflineFlag: True
    XmlVariableSubstitution: True
  </code></pre>
  
  <p>The Error</p>
  
  <pre><code>2019-07-31T14:49:46.1783681Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe"  list app "applications/payroll-forms/hub-manager"
  2019-07-31T14:49:46.2584534Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe"  add app /site.name:"applications" /path:"/payroll-forms/hub-manager" /physicalPath:"F:\Websites\Applications\payroll-forms\hub-manager"
  2019-07-31T14:49:46.3231472Z ERROR ( message:Failed to add duplicate collection element "/payroll-forms/hub-manager". )
  2019-07-31T14:49:46.4988608Z ##[error]Process 'appcmd.exe' exited with code '183'.
  </code></pre>
  
  <p>2019-07-31T14:49:46.5431004Z ##[section]Finishing: IIS Web App Manage</p>
  
  <p>I have tried many combinations and struggling to find an example even though i got a 2 level one working fine.</p>