需要快速帮助:IIS 7.5 在浏览器中将 SWF 显示为文本/html?
我们的 IIS 7.5 在浏览器中将 .swf 文件显示为 text/html。仅当在浏览器中直接加载 swf 时才会发生这种情况。当它嵌入到 .html 文件中时,swf 可以正常显示。
这是怎么回事?我认为它从来没有这样做过。在 IIS 中正确设置了正确的 .swf MIME 类型。 100%确定。
编辑:我只是为了确保禁用压缩。没有帮助。这是响应头。我勒个去?
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Wed, 25 May 2011 20:46:56 GMT
Content-Length: 20859
Our IIS 7.5 is displaying .swf files as text/html in browser. This happens only when directly loading the swf in the browser. When it is embedded in a .html file the swf gets displayed fine.
Whats up with that? I think it never did that. The correct .swf MIME type is set correctly in IIS. 100% sure.
Edit: I just disabled compression just to make sure. Didn't help. Here is the response header. What the hell?
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Wed, 25 May 2011 20:46:56 GMT
Content-Length: 20859
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否被某些重写/重定向规则所困?使用 Fiddler,内容是否正确返回,但假设错误的 mime 类型?
Aren't you being trapped by some rewrite / redirection rule? Using Fiddler, is the content being returned correctly but assuming the wrong mime-type?
嗯,这是 .NET Framework/应用程序池的某种问题。我将应用程序池更改为经典,现在可以使用了。 Swf 已正确传送。我不知道为什么。不完全是一个好的解决方案,但在这种情况下它会起作用
Well it was some sort of problem with the .NET Framework/App Pool. I changed the app pool to classic and it works now. Swfs are beeing delivered correctly. I have no idea why. Not exactly a good solution but in this case it will work