Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to configure a demo machine which is EEEPC with Windows 7 Home Premium edition all the drivers properly loaded (don't ask me why it's Home edition) with IIS7 installed.

I've deploy the application to be demo-ed on the machine which is an ASP.NET MVC site, added website via the console, added an app pool. The app pool run as NetworkService and guest authenticate as IUSR.

I've added modify rights to NetworkService and read & execute rights to IUSR to the website's folder and its content.

When I hit the root of the web, say http://example.com/ I gets a proper HTML rendered from the website (which means the application works) but the problem is that all static content returns blank.

I'm not sure why is this happening. No 404 or 500 error page, just plain empty response when I access static content. All ASP.NET-generated content works fine (albeit a little strange since all CSS and images won't load)

Please help, IIS7 Management Console is very confusing to me and I need the machine by tomorrow.

share|improve this question

3 Answers 3

up vote 9 down vote accepted

Did you turn on the static content feature?

http://weblogs.asp.net/anasghanem/archive/2008/05/23/don-t-forget-to-check-quot-static-content-service-quot-in-iis7-installation.aspx

share|improve this answer
    
Here is where to find the option: Server Manager > Roles > Add Role Services. You need to check the box next to Static Content –  John M Dec 30 '11 at 16:09

As @MattB suggested, I havn't had the "Static Content" feature enabled, but that is only one part of the problem.

I've added the "Static Content" feature and yet the problem still persist, so I go about removing the default MvcHttpHandler from the handler mappings list and somehow the problem solves itself... so the problem was that MvcHttpHandler was intercepting requests before the StaticFileHandler,

FYI, after installing the "Static Content", also make sure that...

  1. In the Internet Information Services Manager, click your website.
  2. Double-click on the "Handler Mappings" feature.
  3. On the right-hand side (the Action panel) you will see a link titled "View Ordered List..." , click it.
  4. You will then find the order the module are matched to each requests, make sure that the order make sense.

In my case MvcHttpHandler was above everything else, I solved the problem by moving it to the bottom of the list, which is the most sensible place it ought to be in because AXD file handlers, TRACE handlers, OPTIONS handler and static content gets a shot at handling the request first.

Hope this helps someone googling for the same problem :-)

share|improve this answer

In my case, the server role was already installed, and yet the static handler served blank pages even for a trivial test site with just a single handler mapping.

The fix was to enable the request restriction "Invoke handler only if request is mapped to". It doesn't matter whether I set it to "File" or "File or directory"; as long as the checkbox is enabled, it works:

                  enter image description here

If this still doesn't help, another thing that leads to blank pages is trying to specify a path in the "Request path" section, like public or maybe public/*. The latter is simply wrong, while the former should be accepted, but instead results in blank pages. The solution is to wrap the handler mapping into a <location path='public'> section, specifying * for the "Request path" setting. Or, in IIS Manager, expand the site and select your folder first, then edit the handler mappings.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.