0

Web フォントを使用する ASP MVC 4 .Net Web サイトで奇妙な問題が発生しています。

このサイトは FontAwesome と Roboto を参照しており、FireFox、Chrome、IE10 で期待どおりにレンダリングされますが、IE8+ でも動作する必要があります。

HTMLソースがローカルに保存されている場合はIE8で機能しますが、 IIS によって返された場合は機能しません

IIS(7またはVS2010のIIS Expressでのデバッグ)によって提供されたときに.eotがブラウザに送信されていないようです。しかし、woff と ttf は期待どおりに戻ります (Fiddler と Firebug を使用して確認)。

私は既に持っています:

  • mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /> web.config 内。

  • .css およびフォント ファイルの [コンテンツ] に設定されたビルド アクション。

  • css @fontface として宣言:

    @font-face
    {
        font-family:'FontAwesome';
        src:url('../font/fontawesome-webfont.eot?v=3.1.0');
        src:url('../font/fontawesome-webfont.eot?#iefix&v=3.1.0') format('embedded-opentype'),
        url('../font/fontawesome-webfont.woff?v=3.1.0') format('woff'),
        url('../font/fontawesome-webfont.ttf?v=3.1.0') format('truetype'),
        url('../font/fontawesome-webfont.svg#fontawesomeregular?v=3.1.0') format('svg');
        font-weight:normal;font-style:normal
    }
    

401:

HTTP/1.1 401 Unauthorized
Content-Type: text/html
Server: Microsoft-IIS/7.5
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
Date: Wed, 16 Oct 2013 14:48:51 GMT
Content-Length: 1293
Proxy-Support: Session-Based-Authentication

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
 </fieldset></div>
</div>
</body>
</html>

200:

HTTP/1.1 200 OK
Content-Type: application/vnd.ms-fontobject
Last-Modified: Tue, 13 Aug 2013 10:43:18 GMT
Accept-Ranges: bytes
ETag: "067e7eb1198ce1:0"
Server: Microsoft-IIS/7.5
Persistent-Auth: false
X-Powered-By: ASP.NET
WWW-Authenticate: Negotiate oYGgMIGdoAMKAQChCwYJKoZIgvcSAQICooGIBIGFYIGCBgkqhkiG9xIBAgICAG9zMHGgAwIBBaEDAgEPomUwY6ADAgEXolwEWl1ljYO00B8Uphl5NsfdQu3+5k9yJlSL2JTRqcofSeQ9oylbvSVbHKLWvBrFned5/+Sxodxe6MkY+IB0xEvtp3FVXB4HM3MuanzmqUo7p58L+wDxxG7hdnRgsA==
Date: Wed, 16 Oct 2013 15:36:17 GMT
Content-Length: 29360

�r���q����������������������LP�����������������������#M
�������������������F�o�n�t�A�w�e�s�o�m�e����R�e�g�u�l�a�r���$�V�e�r�s�i�o�n� �3�.�1�.�0� �2�0�1�3���&amp;�F�o�n�t�A�w�e�s�o�m�e� �R�e�g�u�l�a�r�����BSGP�������������������q��q��e�����Y�D
M�F�x���&gt;��ޝ��Ə)[1ɵH���-A)F��ٜ1��.�/
d�U'�&amp;a
4

0 に答える 0