资源间preTED的样式,但MIME类型文本转/ HTML的IIS ASP.NET [英] Resource interpreted as Stylesheet but transferred with MIME type text/html in ASP.NET IIS

查看:318
本文介绍了资源间preTED的样式,但MIME类型文本转/ HTML的IIS ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当执行该页面被剥离 CSS 的我有一个登录页面

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

我从铬调试器发现了此消息。我使用asp.net 2008年。

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

任何想法?

<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>

编辑为每@robx建议。

edited as per @robx advice.

推荐答案

我看来,像这个问题是在您的IIS配置。它的配置可能提供与text / html的MIME类型.css文件。

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

试着要去MIME类型配置Web服务器,看看你是否能发现任何东西在那里。

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

正确的MIME类型.css文件是文本/ CSS。

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

您也可以对HTTP头的参数与一些HTTP嗅探器,如小提琴家看看。

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

更新:接受的答案应该是一个由@ breet,彭宁斯指出!
只是提供静态内容,该错误会自动消失:

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

这篇关于资源间preTED的样式,但MIME类型文本转/ HTML的IIS ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆