【发布时间】:2014-05-30 13:39:40
【问题描述】:
我在一个类中做一个 MVC ASP.NET 应用程序,在这个类中,在 Visual Studio Premium 2013 上运行的程序运行流畅,看起来像这样:
所以现在是发布的时候了,我已经完成了教授要求的所有工作。我通过 IIS 发布,默认站点如下所示:
<html>
<head>
<title>CTS2463</title>
</head>
<body>
<p>CTS2463 CLASS</p>
<br />
<p>Projects:</p>
<br />
<ul>
<li><a href="http:/MvcMusicStore/">MvcMusicStore</a></li>
</ul>
<br />
</body>
</html>
所以项目 MvcMusicStore 在 C:\inetpub\wwwroot\ 下。它加载正确,我可以自己注册,“签出”订单等等。然而,它看起来像这样:
如您所见,没有资源加载。我点击了一张损坏的图片,在 Chrome 的 javascript 调试器下我得到了这个:
Resource interpreted as Stylesheet but transferred with MIME type image/svg+xml: "http://localhost/MvcMusicStore/Content/site.css". localhost/:8
Resource interpreted as Script but transferred with MIME type image/svg+xml: "http://localhost/MvcMusicStore/Scripts/modernizr-2.5.3.js". localhost/:10
Resource interpreted as Script but transferred with MIME type image/svg+xml: "http://localhost/MvcMusicStore/Scripts/jquery-1.7.1.js". localhost/:117
所以据我了解,每个资源(css、图像、js)都被转换为 xml。为什么会发生这种情况?如果您对此有解决方案,请告诉我,并提前感谢您
【问题讨论】:
标签: javascript css asp.net-mvc iis mime