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.
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
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...
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 :-)
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:
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 maybepublic/*
. 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.