asp.net mvc - Custom css font display with interference after publishing site to Azure -


trying post web-site @ different hostings (somee.com, azure, localhost). site @ asp.net mvc 4.

displaying @ localhost , somee.com: https://dl.dropboxusercontent.com/u/58930284/testing/font_local.png

at azure web site:
https://dl.dropboxusercontent.com/u/58930284/testing/font_azure.png

css:

@font-face  {    font-family: 'font name';    src: url("fonts/font name.eot");    src: url("fonts/font name.eot?#iefix") format("embedded-opentype"),      url("fonts/font name.woff") format("woff"),      url("fonts/font name.ttf") format("truetype"),      url("fonts/font name.svg") format("svg");    font-weight: normal;    font-style: normal; } 

iis 7 not return file types not added element or have mappings in element default. behavior prevents unauthorized access files not have mappings in iis 7 configuration settings.

basically, iis not return static files not know media type. therefore, need add unknown mime types manually.

<configuration>    <system.webserver>        <staticcontent>          <remove fileextension=".svg" />          <remove fileextension=".eot" />          <remove fileextension=".woff" />          <mimemap fileextension=".svg" mimetype="image/svg+xml"  />          <mimemap fileextension=".eot" mimetype="application/vnd.ms-fontobject" />          <mimemap fileextension=".woff" mimetype="application/x-woff" />        </staticcontent>    </system.webserver> </configuration> 

place configuration webconfig file in project.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -