Search This Blog

Monday, August 1, 2011

Images and CSS missing from IIS7 website





I'm moving a website from IIS6 running on a Windows 2003 server to IIS7 running on a Windows 2008 server and was having a fairly smooth time of it until I first tried to view the default web page from the local host. It looked like only the controls specifically updated by ASP.NET were being shown -- all the static content, including images, were missing and and the css files were clearly not applying any formatting.

The problem was straightforward and could be traced to my installion of IIS7: compared to IIS6, IIS 7 offers such a higher level of control and granularity in its installation that I neglected to specifically enable "static content" in the web server. I'd assumed, and you know what happens when you assume.

By going into control panel and asking to add "Windows Features," and then updating the web server role, the missing option presented itself pretty clearly as "not installed." After installing it, the website worked pretty much as it did before.

































x












No comments: