Home » IIS » Access to the path C:\Windows\SysWOW64\inetsrv is denied (Solved)

Access to the path C:\Windows\SysWOW64\inetsrv is denied (Solved)

The web browser may throw 401 Unauthorized errors if the application can’t access to a path that is trying to read or write. Therefore, you may see “Access to the path is denied” error.

Here is the full error message:

Access to the path ‘C:\Windows\SysWOW64\inetsrv’ is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path ‘C:\Windows\SysWOW64\inetsrv’ is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose “Properties” and select the Security tab. Click “Add” to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Access to the path is denied

Trying to configure HTTP Redirection in IIS? Check this post out.

Root cause

As the error message states, there is an access issue to a folder. The first thing to check is that Security permissions for the folder mentioned in the error message. The application pool identity of your web application should have permission on this folder.

In my case, the error message referred to C:\Windows\SysWOW64\inetsrv folder. This is the folder IIS uses for configuration and executables. Web applications shouldn’t make any changes to this folder. Therefore, you may want to check your application code to figure out the root cause (An example scenario).

You may ask what SysWOW64 folder is for. This is a folder to handle 32-bit applications in 64-bit systems. More information: WoW64.

How to solve “Access to the path is denied” errors

  1. Open IIS Manager
  2. Go to “Server > Application pools”
  3. Check the value in “Identity” column for the application pool you are using
  4. Go to the folder above the path specified in the error message (C:\Windows\SysWOW64)
  5. Right click and select “Properties” for the folder specified in the error message (inetsrv)
  6. Give “Full Control” permission to the application pool identity you saw in the Step 3 (In my case, I gave permission to “Network Service”)

If assigning permissions doesn’t help, I would recommend trying to enable “32-bit Applications” for the application pool. Additionally, disabling Impersonation may lead you to the solution as well.

References

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.
Categories IIS

Leave a Comment