0

I have a web app running in IIS7 on Windows Server 2008. There is a virtual directory pointing to a shared folder "/Content/Data" on another machine (running Windows Server 2003), as well as a real directory "/Content/Images" on the local machine (web app sub folder).

Accessing images in "/Content/Images" is no problem, but when an image (e.g. a JPEG file) in the "/Content/Data" is accessed by a browser, IIS returns this error:

HTTP Error 403.1 - Forbidden: Execute access is denied.

However, the web app can read and write to / from it. I assume IIS and ASP.NET are running under different user accounts?

Does anyone have an idea on what I have to do to make it work? I have set the permissions on the shared folder to Everyone Full Control, with no luck.

1
  • What happens if you turn on execute script permissions for the virtual directory? Sep 24, 2010 at 20:07

1 Answer 1

1

Sounds like something has configured IIS to map the .jpg file type to an executable (could be .NET, CGI, ISAPI, ...).

Check, for the root of the IIS Web App, the Handler Mappings for a path that will match the URL of the file you are requesting.

(The error is about IIS being configured to not allow code to run to satisfy the HTTP request. One could create a handler for *jpg to allow the images to be generated dynamically or loaded from a database rather just serving static files.)

3
  • Since there is no problem with the images in the local "/Content/Images", I don't think this is the problem. They would not have worked either then, right?
    – Kristoffer
    Feb 18, 2010 at 12:37
  • @Kristoffer: not necessarily - the handler mappings can be specified at the site level, and at the directory level - check both places. Also, check the "MIME Types" settings in both places - make sure the .jpg/.jpeg is set to image/jpeg
    – MattB
    Feb 18, 2010 at 14:33
  • @Kristoffer: General rule of finding problems: if you assume something must be working, it will be your assumption that is wrong. Checking doesn't take long.
    – Richard
    Feb 18, 2010 at 16:29

You must log in to answer this question.