直播服务器错误WOFF字体MIME类型 [英] woff font MIME type on live server error

查看:151
本文介绍了直播服务器错误WOFF字体MIME类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net MVC 4的网站,我使用WOFF字体。在VS的IIS运行时,一切正常。然而,当我上载的颈部,以托管的1and1(活服务器),我得到了以下内容:

I have an asp.net MVC 4 website where I'm using woff font. Everything works fine when running on VS IIS. However when I uploaded the pate to 1and1 hosting (live server) I get the following:

NetworkError:404未找​​到 -   <一href="http://www.com/Content/font/fontawesome-webfont.woff?v=3.2.1">http://www.com/Content/font/fontawesome-webfont.woff?v=3.2.1

NetworkError: 404 Not Found - http://www.com/Content/font/fontawesome-webfont.woff?v=3.2.1

当我有这个在我的web.config文件(如一些建议),我的Web应用程序停止工作完全和负载下去。

When I include this in my web.config (as some suggest) my web application stops working completely and load indefinitely.

    <staticContent>
        <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
    </staticContent>

我是什么做错了吗?

what am I doing wrong?

推荐答案

您是否尝试过将在你的web.config一个新的之前删除的映射?

Have you tried removing the mapping before adding a new one in your web.config?

例如:

<configuration>
   <system.webServer>
        ...
        <staticContent>
           <remove fileExtension=".woff" />
           <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
        </staticContent>

这篇关于直播服务器错误WOFF字体MIME类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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