我有一个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未找到 - 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>