简体   繁体   English

Windows Phone上的Bootstrap 3字形

[英]Bootstrap 3 glyphicons on Windows Phone

To display Bootstrap 3.0 glyphicons on Windows Phone, I was forced to add the following section to my web.config file: 要在Windows Phone上显示Bootstrap 3.0字形,我不得不将以下部分添加到我的web.config文件中:

<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".woff" mimeType="font/x-woff" />
  </staticContent>
</system.webServer>

The problem now, is that it breaks development in Debug mode on DEV machines. 现在的问题是,它破坏了在DEV计算机上以Debug模式进行的开发。 The error is: 错误是:

500.19 Internal Server Error Cannot add duplicated collection entry of type 'mimeMap' with unique key attribute 'fileExtension' set to '.woff'. 500.19内部服务器错误无法添加类型为“ mimeMap”的重复集合条目,且其唯一键属性“ fileExtension”设置为“ .woff”。

How can I solve it? 我该如何解决? I am using Visual Studio 2013 on Win 8.1. 我在Win 8.1上使用Visual Studio 2013。

Thanks. 谢谢。

Solved using the following transform on the Web.Release.config file. Web.Release.config文件上使用以下转换解决。 In this way it only affects production website: 这样,它仅影响生产网站:

<system.webServer xdt:Transform="Insert">
  <staticContent>
    <mimeMap fileExtension=".woff" mimeType="font/x-woff" />
  </staticContent>
</system.webServer>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM