Handle IIS WebSites with multiple Web Applications #24
Description
Currently this breaks in Generate_IIS, but we need to extend Discover_IIS and the artifact JSON to allow for multiple Web Apps under one Web Site. Sample applicationHost.config
:
<sites>
<site name="Default Web Site" id="1">
<application path="/">
<virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
</application>
<application path="/WebApplication1" applicationPool="DefaultAppPool">
<virtualDirectory path="/" physicalPath="C:\scm\github\sixeyed\IisConsoleLog\WebApplication1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
</bindings>
</site>
...
The solution also needs to support the same setup in Metabase.xml
configuration.
We should support three scenarios:
1 - allow a specific web app to be extracted from a VM. E.g. in the above sample we have the website called Default Web Site
which contains an app called WebApplication1
. Users should be able to extract just that app into the Dockerfile with -Artifact IIS -ArtifactParam 'Default Web Site/WebApplication1'
2 - If a website but not a web app is specified as a parameter, extract all the web apps in the website into the Dockerfile, e.g. -Artifact IIS -ArtifactParam 'Default Web Site'
3 - if no artifact parameter specified, preserve the existing IIS setup - bringing all websites and all web apps into the Dockerfile, e.g. -Artifact IIS