Softwareโฑ๏ธ 4 min read๐Ÿ“… 2026-06-03

How to Fix: Hosting ASP.NET in IIS7 gives Access is denied?

IIS7 permission issue for ASP.NET application running under NetworkService

Quick Answer: Check IIS7 permissions for the NetworkService account and ensure it has read access to the application directory.

The 'Access is denied' error in IIS7 can be frustrating, especially when it occurs with ASP.NET applications. This error typically affects users who do not have the necessary permissions to access the application's resources.

This issue can arise due to various reasons, including incorrect file permissions, inadequate user roles, or insufficient access control lists (ACLs). In this guide, we will walk you through the root causes and provide step-by-step solutions to resolve this problem.

๐Ÿ” Why This Happens

  • The primary reason for this error is that the IIS7 application pool identity does not have the required permissions to read or write files in the application's directory. This can happen when the NetworkService account used by ASP.NET does not have the necessary rights.
  • Another possible cause is an incorrect file permission configuration, where the wrong user or group has been assigned to access the application's resources.

๐Ÿ”ง Proven Troubleshooting Steps

Configuring File Permissions for IIS7 Application Pool

  1. Step 1: Step 1: Open the IIS Manager and select your ASP.NET application pool. In the Feature Delegation section, click on the 'Edit' button next to the 'Application Pool Identity' field.
  2. Step 2: Step 2: In the 'Application Pool Identity' window, click on the 'Change' button to modify the identity of the application pool. Select the NetworkService account and click 'OK'.
  3. Step 3: Step 3: Navigate to the application's directory in Windows Explorer and right-click on it. Select 'Properties' and then click on the 'Security' tab.
  4. Step 4: Step 4: In the Security tab, click on the 'Edit' button next to the 'Group or user names' field. Add the NetworkService account to the list of users with access permissions, making sure to check the box next to 'Read & execute'. Click 'OK' to save changes.

Checking and Correcting File Permission Configuration

  1. Step 1: Step 1: Open the Command Prompt as an administrator and navigate to the application's directory. Use the `icacls` command to display the current file permissions.
  2. Step 2: Step 2: Identify any users or groups that do not have the necessary permissions to access the application's resources. Note down their usernames or group names.
  3. Step 3: Step 3: Navigate back to the IIS Manager and select your ASP.NET application pool. In the Feature Delegation section, click on the 'Edit' button next to the 'Application Pool Identity' field.
  4. Step 4: Step 4: In the 'Application Pool Identity' window, click on the 'Change' button to modify the identity of the application pool. Select a user or group that has been noted as lacking permissions and click 'OK'.

๐Ÿ’ก Conclusion

By following these steps, you should be able to resolve the 'Access is denied' error in IIS7 caused by incorrect file permissions or inadequate user roles. Remember to verify your changes and test the application to ensure it is working correctly.

Did this fix your problem?

If not, try searching for specific error codes.

๐Ÿ” Search Error Database

โ“ Frequently Asked Questions