IIS sends empty .CSS file

B

BGU

Hello,

I have a bizarre problem where cascading style sheets are not being
applied. After a while, I whittled the repro steps down to the
following:

1. Create Web site in Visual Studio.
2. Enter the Designer for Default.aspx.
3. Type in some text.
4. Add a style sheet to the project.
5. Build a style in the style sheet.
6. Go back to Default.aspx and set the Document's Style Sheet
property to the new style sheet.
7. Publish the site to a local or remote Web server (IIS 7 in my
case).
8. Try to hit the site.

The style is not applied. I checked a packet sniffer & IIS passes a
200 code back to the browser for the .CSS request, but with a Content-
Length of zero:

Client: GET./Desktop.css.HTTP/1.1 ...

Server: HTTP/1.1.200.OK..Server:.Microsoft-IIS/7.0..X-Powered-
By:.ASP.NET..Date:.Fri,.13.Jul.2007.06:32:38.GMT..Content-Length:.
0....

I am at a loss--has someone else seen this problem? It seems to be
specific to the IIS installation on my development workstation. I
published to a few other servers with no problem.

Thanks,
BGU
 
B

BGU

Solution: go into "Turn Windows Features On or Off"; find the IIS
area; check the checkbox called "Static Content."

Well, that's four hours of my life I'll never get back. :)

-BGU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top