2013-10-10 43 views
0

我們在我們的應用程序中使用了字體真棒。當應用程序駐留在IIS上時,我們無法看到正確的字體。 否則,通過Visual Studio運行會提供正確的字體。在託管的ASP應用程序中無法正確顯示字體真棒

<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> 
<link href="assets/plugins/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/> 
<link href="assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> 
<link href="assets/css/style-metro.css" rel="stylesheet" type="text/css"/> 
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/> 
<link href="assets/css/style-responsive.css" rel="stylesheet" type="text/css"/> 
<link href="assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/> 
<link href="assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/> 

這是母版頁文件中的部分。

回答

-1

將以下行添加到Web.Configs system.WebServer標記中。

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

如果你已經解決了問題,你可以將你的問題標記爲答案嗎? – Damon

0

您可以這樣做,或者在IIS中註冊MIME類型。如果您是管理員,則可以在服務器級別註冊,並且所有站點都可以工作。重新啓動站點或IIS是必需的。在這種情況下,請從web.config文件中刪除顯式註冊。