Setting up IIS usually results in some error (403, 500…) at first. Since I run into this a lot and always forget to write down the steps, here’s my cheatsheet now, which I’ll update if I run into additional issues.
IIS_IUSRSRead permission to the folder containing your code.
- If StaticFile throws a 403 when accessing static files, also give
- Make sure files aren’t encrypted (Properties => Advanced)
If your code modifies files in that folder (e.g., using the default identity database or logging, etc.), you might need write permissions as well.
Registering ASP.net with IIS
If installing .net Framework after IIS, need to run one of these:
- Windows 7/8/2012:
- Windows 10:
dism /online /enable-feature /all /featurename:IIS-ASPNET45