IIS 7 on Win 2008 R2 does not display images by default

This might be the solution:

Check the Static Content checkbox under World Wide Web Services / Common Http Features.

Here is a page with a screenshot:

http://gurustop.net/blog/2009/10/12/funny-problem-windows-7-iis-7-5-images-css-not-showing/

Another page:

http://peterkellner.net/2008/04/01/iis7imageproblem/


In my case the feature was already installed. What solved the problem was:

  1. Uncheck the Static Content checkbox under World Wide Web Services / Common Http Features, then restart the server
  2. Check the Static Content checkbox under World Wide Web Services / Common Http Features.

I found that, with a .NET 4.0 site, the following entry in the web.config caused my images to not get served up:

  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

Removing the runAllManagedModulesForAllRequests="true" solved the problem for me.