4

I am using asp.net 2.0 and IIS 7 on vista 64 bit. everytime, when i try to open page in browser, i get following error.

Access is denied. Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.

Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:\example\WebApplication1\WebApplication1\Default.aspx'.

Novice Developer
  • 4,489
  • 11
  • 39
  • 42
  • Possible duplicate of [Hosting ASP.NET in IIS7 gives Access is denied?](http://stackoverflow.com/questions/10418669/hosting-asp-net-in-iis7-gives-access-is-denied) – Tomas Kubes Apr 10 '16 at 13:20

4 Answers4

2

Does your application pool's user have read permissions to the files you're trying to serve? By default, this should be the NETWORK SERVICE user.

Your ASPNET user will also need access.

Permissions can be set here: Right click the directory or file --> Properties --> Security tab

Matthew Cole
  • 1,329
  • 2
  • 18
  • 30
  • network service user has read permission. i try to add iis_user and give full permission. but it was same problem. then i added everyone user with read, write and list folder contents permissions. it works for me. – Novice Developer Nov 18 '09 at 03:52
  • That's probably fine for a dev machine. Definitely don't go this route on a production server though. :-) You can always use Procmon to figure out which user is getting denied access: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx – Matthew Cole Nov 18 '09 at 03:56
  • Zombie thread, I know: Where is that in perfmon? I see Result: ACCESS DENIED in Event Properties, but that's about it. [image](http://farm8.staticflickr.com/7363/9060267724_97ac1d3306.jpg) – ruffin Jun 16 '13 at 17:45
2

You need to give the permission to user name "Internet Guest Account" on C:\example directory on an inner directory given you have used the same user in the IIS anonymous setting.

Bhushan Bhangale
  • 10,921
  • 5
  • 43
  • 71
1

Give your aspnet local user permission to the directory you're trying to access.

No Refunds No Returns
  • 8,092
  • 4
  • 32
  • 43
1

You need to add permission to the user binded with Application Pool on folder in which is your website.

The name of the user is usually IUSR, NETWORK SERVICE or IIS_IUSRS.

Permision to the root: Read and Execute, List folder and read Permission to the root/App_Data: All

Or another approach could be to set the username in the application pool (Advance setting -> Identity) to the username which has rights to read the directory. You may need create new application pool.

Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148