ASP.NET MVC 下 引用阿里巴巴和IconFont字体路径404问题

参考:http://stackoverflow.com/questions/28169365/font-wont-get-found-on-server-for-firefox#

         http://blog.csdn.net/lujianfeiccie2009/article/details/7318320 

         http://bbs.csdn.net/topics/350256191

         http://blog.csdn.net/pigkeli/article/details/26493055

 添加MIME映射,在web应用最外层的Web.config下的  <system.webServer>节点下添加

 

    <staticContent>

 

      <remove fileExtension=".woff"/>
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
      <remove fileExtension=".woff2"/>
      <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
      <remove fileExtension=".ttf" />
      <mimeMap fileExtension=".ttf" mimeType="application/x-font-truetype" />
      <remove fileExtension=".svg" />
      <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      <remove fileExtension=".otf" />
      <mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" />
      <remove fileExtension=".eot" />
      <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
    </staticContent>

 

posted @ 2015-05-23 09:36  whaozl  阅读(824)  评论(0编辑  收藏  举报