--注:请到编辑后的第2节进行摘要
我有一个ASP.NT MVC (4)应用程序。我整合了(推特)引导到它。引导程序运行得很好,但是当我发布应用程序时,图标没有正确显示。
我试图重新发布应用程序,但没有成功。
为了澄清,我在下面放了一些图片。
当我从VS2013运行我的应用程序时,结果是这样的(这是可以的):

在booth,IE和Chrome。
但是,当我运行已发布的应用程序时,结果是这样的(这是不好的):


这个问题在某种程度上与评估的CSS有关,但我不知道在什么时候会发生这种情况。
本地应用程序中的评估css如下(这是可以的):


但在已发布的应用程序中,我有以下(这是不合适的):


有些人经历过这种行为?
我能做些什么来解决这个奇怪的问题?
···
在发布我的应用程序时,我会获得要包含的字体文件(.eot、.svg、.ttf和.woff)。当我访问默认页面(应用程序根http://localhost/)时,即显示图标的页面,Chrome网络选项卡中显示的文件如下:

在包含这些文件之前,我收到了404个文件错误,所以我可以猜测,即使它们没有显示在Network中,也会继续被请求。
不过,图标没有正确显示。
编辑2?
嗯,我在IIS 7中重新启动了我的站点,并且请求开始被触发。这些文件请求显示在Chrome的Developper Network Tab中:

然后,resquest将在:/Content/themes/fonts/中查找文件,但它们在:/Content/themes/base/fonts/中。
base文件夹包含一个包含bootstrap.css文件的bootstrap文件夹。在CSS文件中,有这个类引用字体文件:
@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('../fonts/glyphicons-halflings-regular.eot');
  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}似乎对字体文件的引用很好,因为文件树是这样的:

我可以把这门课改为:
@font-face {
      font-family: 'Glyphicons Halflings';
      src: url('../base/fonts/glyphicons-halflings-regular.eot');
      src: url('../base/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../base/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../base/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../base/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
    }但是,我知道这是怎么回事,以及如何解决它!此外,图标将显示在发布的网站,但不在本地网站(运行从VS2013与iisexpress)。,谢谢您的帮助!
发布于 2014-12-09 16:51:07
我也有这个问题。我使用的解决方案在这个问题中:https://stackoverflow.com/questions/27254055/manually-added-directory-not-automatically-included-with-one-click-file-system-d
再次使用一次单击deploy,文件就会发布。
https://stackoverflow.com/questions/20563001
复制相似问题