Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

Any ideas?

<head id="Head1" runat="server">  <title>CalibPro</title>  <link href="css/Login.css" rel="stylesheet" type="text/css" />  <link href="css/Common.css" rel="stylesheet" type="text/css" />  </head> 

edited as per @robx advice.

like image 495
sansknwoledge Avatar asked May 22 '11 15:05

sansknwoledge


1 Answers

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.

like image 115
Variant Avatar answered Sep 21 '22 14:09

Variant