You get 404 errors because the IIS configuration does not have a specific managed handler mapped to the *.png path. Thus, all requests to the Image/*.png StaticFile intercepted by the StaticFile modules ( StaticFileModule, DefaultDocumentModule, DirectoryListingModule ), and these modules cannot find the requested files.
You can solve this problem by configuring the application in web.config .
The first option is to add the runAllManagedModulesForAllRequests="true" attribute to the configuration/system.webServer/modules element. It should look like this:
<modules runAllManagedModulesForAllRequests="true" />
NOTE: But I highly recommend not to do this. Learn more about potential performance issues .
So, the second (and much better) option is to register ASP.NET ISAPI to process your requests on the Image/*.png path:
<system.webServer> <handlers> <add name="ImageMVCHandler-ISAPI-4.0_32bit" path="image/*.png" verb="GET,HEAD" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> <add name="ImageMVCHandler-ISAPI-4.0_64bit" path="image/*.png" verb="GET,HEAD" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> <add name="ImageMVCHandler-Integrated-4.0" path="image/*.png" verb="GET,HEAD" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> </system.webServer>
source share