IIS: Content-Length 0 for CSS, Javascript and Images

Posted by Adrian Grigore on Server Fault See other posts from Server Fault or by Adrian Grigore
Published on 2010-02-21T12:27:28Z Indexed on 2010/04/21 20:44 UTC
Read the original article Hit count: 247

Filed under:
|

After a clean re-installation of my Windows 7 system, I can't get IIS 7 to properly deliver any static content. Dynmic content (ASPX pages and content served by ASP.NET MVC controllers) works fine, but static files such as CSS, Javascript and Images give me a 200 OK status code and a Content-Length of 0.

The problem occurs with all web sites on my server, even a brandnew ASP:NET MVC template project with no changes. It also occurs with both Firefox and IE 8.

What could possibly be the problem?

Note that I also installed the latest Windows Azure SDK, perhaps that messed up some settings. But I don't know how to proceed with for troubleshooting this.

© Server Fault or respective owner

Related posts about iis

Related posts about iis7