```html
When testing ASP.NET applications on IIS 7.5 (Windows 7), the HTTP 401.3 error typically indicates permission issues at the filesystem level rather than authentication problems. The error message explicitly mentions ACL (Access Control List) configuration, which means we need to verify both IIS application pool identity and NTFS permissions.
While you've added common identities like NETWORK SERVICE and IIS_IUSRS, modern ASP.NET applications often require additional considerations:
Required permissions:
- Read & Execute
- List folder contents
- Read
- (For dynamic content) Write
1. Verify Application Pool Identity:
// Check application pool in IIS Manager: 1. Open IIS Manager 2. Navigate to Application Pools 3. Identify the pool your app uses 4. Note the identity (usually ApplicationPoolIdentity)
2. Grant Correct Permissions:
// Using ICACLS command (run as admin): icacls "C:\YourAppPath" /grant "IIS AppPool\YourAppPoolName":(OI)(CI)(RX)
3. Special Case for Virtual Directories:
If using virtual directories, ensure: - Physical path permissions match main application - Authentication inherits from parent - No double-restriction in web.config
When standard fixes don't work, check these often-overlooked settings:
// In applicationHost.config (located in %windir%\system32\inetsrv\config)
<location path="YourSite">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true"
user="IUSR" /> <!-- Verify this matches your setup -->
</authentication>
</security>
</system.webServer>
</location>
For an ASP.NET MVC application with custom folders, you might need:
icacls "C:\App\Uploads" /grant "IIS AppPool\MyAppPool":(OI)(CI)(M) icacls "C:\App\Views" /grant "IIS AppPool\MyAppPool":(OI)(CI)(RX)
Remember to recycle the application pool after permission changes:
appcmd recycle apppool /apppool.name:YourAppPoolName
When testing ASP.NET applications locally on IIS 7.5 (Windows 7), developers often encounter:
HTTP Error 401.3 - Unauthorized
You do not have permission to view this directory or page because of
the access control list (ACL) configuration or encryption settings for
this resource on the Web server.
While you've added common identities (NETWORK SERVICE, IIS_IUSRS, etc.), these additional checks are crucial:
- Verify inheritance is enabled for child objects
- Check if any explicit deny rules exist
- Confirm Windows Authentication is properly configured
Open command prompt as Administrator and run:
icacls "C:\YourWebsitePath" /grant "IIS_IUSRS":(OI)(CI)(RX)
icacls "C:\YourWebsitePath" /grant "NT AUTHORITY\NETWORK SERVICE":(OI)(CI)(RX)
For ASP.NET scenarios, also ensure:
icacls "C:\YourWebsitePath" /grant "IUSR":(OI)(CI)(RX)
If using custom application pool identity:
icacls "C:\YourWebsitePath" /grant "YourDomain\CustomAppPoolUser":(OI)(CI)(RX)
Capture access denied events by:
- Download Process Monitor from Microsoft
- Filter for "ACCESS DENIED" results
- Identify the exact security context and requested resource
Ensure proper configuration in your web.config:
<system.web>
<authentication mode="Windows"/>
<authorization>
<allow users="*"/>
</authorization>
<identity impersonate="false"/>
</system.web>
For virtual directories or network paths:
icacls "\\NetworkShare\Path" /grant "IIS_IUSRS":(OI)(CI)(RX) /T
Remember to restart IIS after permission changes:
iisreset /noforce