I have created site on my local machine that works fine on debug mode but when i put the site on local iis (7.5) of my machine i get
HTTP Error 401.1 - Unauthorized
As a quick and dirty fix, grant the IIS_IUSRS
group Read/Execute or Modify permissions to your web folder... BUT DON'T DO THIS ON AN INTERNET FACING SERVER, read on....
To fix this properly you should grant the Application Pool Identity for your site Read/Execute or Modify permissions to your application's web folder. To do this:
Edit
Application pool identity
radio button the click OK
ApplicationPoolIdentity
from the "Built-in account" drop down list then click OK
.OK
again to save and dismiss the Application Pool advanced settings pageicacls
For example:
icacls C:\inetpub\wwwroot\mysite\ /grant "IIS APPPOOL\DEFAULTAPPPOOL":(CI)(OI)(M)
If all is good icacls.exe
will report:
processed file: c:\inetpub\wwwroot\mysite Successfully processed 1 files; Failed processing 0 files