IIS hosting .NET development website in a different folder to wwwroot

When setting up new web site from repo, if the source code is not under wwwroot, you may get errors when browsing to the site.  Or you may get 401 errors on static files.

To ensure websites can run, go to the root folder of your repos (alternatively just choose the source folder).

For example c:\users\dave\source\repos

Give following permissions to local PC IIS_IUSERS group:

  • read & execute
  • list folder contents
  • read

In IIS admin, create new site (creates new Application Pool by default).  Click on the new Site, and double click on Authentication icon : right-click on Anonymous Authentication and choose Edit; set the anonymous user identity to “Application pool identity”.

 

To allow browsing from other PCs on same network/workgroup:

 

2 thoughts on “IIS hosting .NET development website in a different folder to wwwroot

Leave a comment