Asp.net MVC页面是给MIME类型的警告图像文件 [英] Asp.net MVC page is giving Mime type warnings for image files

查看:338
本文介绍了Asp.net MVC页面是给MIME类型的警告图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我没有看到受此影响任何功能或jQuery UI的元素,但是当我进入我的asp.net mvc的网页的Chrome开发者控制台登录,象这样一堆错误信息:

While I do not see any functionally or jquery UI elements affected by this, but when I access my asp.net mvc web page the chrome developer console is logged with a bunch of error messages like so:

资源间preTED为图像但MIME类型应用程序/八位字节流传输。

Resource interpreted as image but transferred with MIME type application/octet-stream.

所有的警告是jQuery用户界面图像(虽然我没有在那里任何自定义图像,所以我不知道这是否是唯一的jQuery UI的那样)。所有的jQuery图片加载仍然正确。

All of the warnings are for jquery UI images (though I don't have any custom images on there so I don't know if it's jquery UI only). All the jquery images still load correctly.

有没有人对为什么会这样任何见解?

Does anyone have any insight on why this is happening?

推荐答案

你运行你的网站从Visual Studio的内置Web服务器?很显然,你没有在MIME类型在这种环境中的控制权(见这个)。我看到相同的行为,并开始它的压力终于意识到,我是连看IIS托管的应用程序之前。

Are you running your site from Visual Studio's built-in web server? Apparently, you don't have much control over the MIME types in that environment (see this). I was seeing the same behavior and was starting to stress about it before finally realizing that I wasn't even looking at the IIS-hosted application.

这篇关于Asp.net MVC页面是给MIME类型的警告图像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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