2015-04-17 82 views
-1

我正在使用Bootstrap v3.3.x及其圖形符號。出於某種原因,在遠程服務器上,不是在本地,包含字體的文件夾無法找到,因此圖形文件未加載。在鉻調試器它說:Bootstrap。 Glyphicons不在遠程服務器上加載。無法找到文件夾

x GET http://the IP/web應用程序文件夾/內容/字體/ glyphicons-halflings-regular.woff .................. ............................/web app文件夾/內容/字體/ glyphicons-halflings-regular.woff:1

表示由於無法找到文件而導致的錯誤。

我檢查以下內容:

  • 既引導和引導主題樣式表都包含

  • 文件夾fonts處於同一級別的文件夾css~/Content/css/bootstrap.min.css~/Content/css/bootstrap-theme.min.css~/Content/fonts/

  • 我已添加所需的mimeMap條目到web.config

​​

我還檢查了一切,如果我從遠程位置加載整個引導庫的工作原理:

<!-- Latest compiled and minified CSS --> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> 

<!-- Optional theme --> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> 

<!-- Latest compiled and minified JavaScript --> 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> 

的問題是,我下載庫定製組件並且必須引用服務器上的庫。

乾杯

+0

http://stackoverflow.com/questions/20563001/bootstrap-icons-not-showing-in-published-asp-net-mvc-application – rogerdeuce

回答

0

的原因我的問題是,試圖deply應用程序時VS2010沒有複製請求的文件到遠程服務器上的文件夾。我必須自己複製它們。

爲了解決這個問題,我不得不打開窗戶屬性,去引導的Fonts文件夾,單擊每個文件在那裏,並設置生成操作內容