Search code examples
c#asp.net.netiisiis-express

add a sub application to IIS express


Is it possible to add a separate application to the virtual directory in IIS express so that I could have two applications under one domain ?

Thanks


Solution

  • You could create a sub-application by adding an application section in Documents\IISExpress\config\applicationhost.config

    <site name="WebSite1" id="1" serverAutoStart="true">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
                </application>
                <application path="/mysubapp">
                    <virtualDirectory path="/" physicalPath="D:\myfolder" />
                </application>
    

    enter image description here

    Now you can use a domain for mutiple web apps.