Resource interpreted as Stylesheet but transferred with MIME type text/html in ASP.NET IIS

后端 未结 6 1820
臣服心动
臣服心动 2020-12-08 15:16

i am having a login page when executed the page is stripped out of css.

I found out this message from from chrome debugger. I am using asp.net 2008.

6条回答
  •  感动是毒
    2020-12-08 15:54

    Seems to me like the problem is in your IIS configuration. it might be configured to deliver .css files with text/html MIME type.

    Try going to the MIME types configuration on the web server and see if you can spot anything there.

    The correct MIME type for .css files is text/css.

    You can also have a look on the HTTP header parameters with some HTTP sniffer such as fiddler.

    Updating: The accepted answer should be the one pointed by @brett-pennings! Just providing static contents, the error vanished automatically.

提交回复
热议问题