views:

10

answers:

2

I really need help with my ASP.NET MVC 2 site...

Simply put, I have a a folder Content/Photos in the root of my app. It has many pictures.

For some very strange reason some pictures load just fine on my browser but other pictures give me a 403 error:

You do not have permission to view this directory or page due to the access control list (ACL) that is configured for this resource on the Web server.

I'm completely lost here. Why would some pictures work fine and some give me this error? They are on the same folder.

A: 

Browse to the directory in Windows Explorer and set read permission for the IIS user and ensure that you set it to propagate to all children.

As to why, did you copy and paste the files from elsewhere? Could have permission from previous location.

Dustin Laine
A: 

I would suspect that NTFS file system rights are inconsistent. You can easily check this with AccessEnum from the Sysinternals tools.

Just correct the permissions and make sure they stay consistent by revising how the images get to the directory.

Hint: Files keep their permissions when moved on the same drive (but never when copied).

Tomalak

related questions