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:
- create a self signed certificate in IIS manager (see https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/)
- Edit the bindings of website & ensure:
- host name is blank
- assign another port (ie. don’t use 80 or 443) for example 7500
- Get your PC’s IP address (eg 10.0.1.42) & add an incoming firewall rule for the port
- You should then be able to browse from another PC on the network to:
[…] Welcome to WordPress. This is your first post. Edit or delete it, then start writing! […]
LikeLike
[…] Here is a post I wrote from my old site explaining how to set up as IIS site on local dev PC. https://tatvog.wordpress.com/2019/10/09/iis-hosting-net-development-website-in-a-different-folder-to… […]
LikeLike