2015-04-17 81 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文件夹,单击每个文件在那里,并设置生成操作内容