IIS sends empty .CSS file

Discussion in 'ASP .Net' started by BGU, Jul 13, 2007.

  1. BGU

    BGU Guest

    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
     
    BGU, Jul 13, 2007
    #1
    1. Advertising

  2. BGU

    BGU Guest

    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
     
    BGU, Jul 13, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JCardinal
    Replies:
    1
    Views:
    2,784
    Guenther Liebowitz
    Aug 14, 2003
  2. Alessandro
    Replies:
    0
    Views:
    283
    Alessandro
    Sep 22, 2009
  3. Sandy
    Replies:
    7
    Views:
    160
    Paul Glavich [MVP ASP.NET]
    Jan 15, 2005
  4. Gilles

    (Bug?) IIS Sends response to wrong client

    Gilles, Feb 22, 2005, in forum: ASP .Net Security
    Replies:
    4
    Views:
    309
    Gilles
    Feb 28, 2005
  5. De Co
    Replies:
    0
    Views:
    137
    De Co
    Jul 1, 2010
Loading...

Share This Page