"Cannot verify access to path (C:\inetpub\wwwroot)", when adding a virtual directory

I was having the same issue till just now; just as you mentioned, I tried "Connect As" and the username and password that I wrote down, was my machine's user (IIS is running on this machine), I tested the connection and it works now. Maybe if you weren't using that machine's user (try user with administrator privileges), you should give it a try, it worked for me, it may work in your case as well.


I had the same problem and couldn't figure it out for almost a day. I added IUSR and NetworkService to the folder permissions, I made sure it was running as NetworkService. I tried impersonation and even running as administrator (DO NOT DO THIS). Then someone recommended that I try running the page from inside the Windows 2008 R2 server and it pointed me to the Handler Mappings, which were all disabled.

I got it to work with this:

  • Open the Feature View of your website.
  • Go to Handler Mappings.
  • Find the path for .cshtml
  • Right Click and Click Edit Feature Permissions
  • Select Execute
  • Hit OK.

Now try refreshing your website.


I solved the problem by installing the development related features of IIS.

By default, IIS doesn't install all the required features.

You should install the IIS development related features to fix the problem.

enter image description here

Tags:

Iis

Iis 7.5