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

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


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.


Make sure you enable "Static Content" in IIS Windows Features.

IIS Settings


This is a problem when you are using rewrite url in IIS (in my case it was that), you need to add this entry in your web.config file of your web before the entry of rewrite, something like this:

<rule name="CSS" stopProcessing="true">    <match url=".css" />    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">        <add input="{REQUEST_FILENAME}" matchType="IsFile" />    </conditions>    <action type="None" /></rule><rule name="mod_write" stopProcessing="true">    <match url="^(.*)$" ignoreCase="true" />    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">        <add input="%(REQUES_FILENAME)" matchType="IsDirectory" negate="true" />        <add input="%(REQUES_FILENAME)" matchType="IsFile" negate="true" />    </conditions>    <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" /></rule>