I recently ran into a bizarre problem. On one particular II6 server, and not another, I was unable to download CSS and JS files when using Internet Explorer. I kept getting the message, “Internet Explorer cannot download FileName from WebServer“. I could download the files using Firefox. I even used telnet and manually sent an http request which correctly returned data. Very Odd.
The scenario is this: I have a particular application installed on four IIS servers: mine, my cube neighbors, a development server and another development server in a different office. Both my server and my neighbors server are IIS 5.1 running on Windows XP Pro. The two development servers are IIS 6 on Windows Server 2003.
I was a bit surprised when I went to the server and found the file exactly where is was supposed to be. I assumed two things at this point.
- IIS 6 was configured incorrectly and not serving .CSS files due to mime type configuration.
- There was a permissions problem on the file system.
A quick check threw 1 out the window. IIS was correctly configured to serve CSS files. I checked the permissions on the CSS file and surrounding file system structure and found that the files had correct permissions. What the heck was going on?
By accident I tried the URL to the JS file in Firefox and it downloaded! At that point I began trying my neighbors’ Internet Explorer browsers to see if they also had problems. As it turns out they did!
At this point I tested access to the same JS file on the other servers and they all worked. This prompted me to try using telnet and connecting to port 80 on the server with the problem. I manually sent the http request and data came right back. The problem seemed to be specific to this install of IIS 6 and Internet Explorer.
At this point I tried all the classics solutions, reboot my machine, the server, restart IIS. All a no-go.
Mind you, throughout this entire process I was attempting to Google for a result. Microsoft’s website alludes to a hot fix. They advise against using the hot fix to the point where you’ve actually got to call Microsoft to get it. I didn’t feel like doing that.
By a random chance I found this link to a seemingly unrelated problem: http://www.ariacom.com/forum/forums/forum.asp?forumid=12&page=0&select=54. For the heck of it I tried the provided solution and it worked!
Here’s what to do to solve the problem:
- Open IIS Admin
- View the properties for the website
- Click the HTTP Headers Tab
- Uncheck the Enable Content Expiration checkbox.
That’s all. As soon as I did that I was able to download CSS and JS files from the affected IIS 6 server. This resolved the problem I was having with the application I was working on.