I want to migrate a classic ASP.NET Web Forms that has virtual directories into a container for inclusion as a service in Service Fabric.
Currently, I add the virtual directories in IIS and map to physical drive locations on my local system. If I add these to a container, how will IIS know to map them as virtual directory instead of just another folder?
The process I am looking to achieve is this
Set up a container with IIS
Copy my current deployment into the wwwroot folder in IIS ( In the container )
Create virtual directory under the deployed site and copy some files into it
All these as part of the container creation process
Have a look here to see how to run IIS inside a Windows Container on Service Fabric. The trick is to run the entire application along with IIS inside a container, not just IIS by itself. This way, nothing runs 'locally' on the host node and deployment is much simpler.
More info about how to create the docker file and optionally create a new website by using PowerShell here and here and here.
How to create a virtual dir using PowerShell New-WebVirtualDirectory
here.