How to add virtual directories in iis express?

912 Views Asked by At

I have hosted my web application and it’s sub-applications(virtual directories) in IIS Express and everything working fine. Here i have created applicationhost.config file at this %temp%\iisexpress location.

Instead of creating config file at temp location, I have added the entries in the config file which is present at this location ‘Documents\IISExpress\config’. But while launching the application, am getting the below exception

enter image description here

applicationhost.config file entries: enter image description here

How to resolve this issue? Or how to add sub-applications (virtual directories) to the main application in IIS Express?

1

There are 1 best solutions below

0
On

For configuring the main application:

appcmd add site /name:"" /bindings:""

For sub-applications:

appcmd add app /site.name:"" /path:"" /physicalPath:"" /applicationPool:""