Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web publishing in ASP.Net does not publishes for following file formats

I am trying to publish a web site, in which css directory includes different files for font settings.

Following are the file & extensions:

 calibri-webfont.eot
 calibri-webfont.svg
 calibri-webfont.ttf
 calibri-webfont.woff
 calibri-webfont.oft

Now when I try to publish website, it just publishes .svg file,other files I need to copy manually. Whiles publishing following options I have checked:

  1. Replace matching files with local copy
  2. Only files needed to run this application.

Expected: as all those files are required, I want those to be get published automatically, than manually coping those.

How this can be achieved?

like image 938
Emma Avatar asked Dec 27 '22 07:12

Emma


1 Answers

I know you asked this a very long time ago, but today it ranks high on Google and I've just had the same problem. Today's fix was that Azure does not have MIME types configured for several font file formats. This must be added to web.config otherwise Azure simply returns a 404 error (even though the files are actually published).

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

Source: http://www.codepal.co.uk/show/WOFF_files_return_404_in_Azure_Web_Sites

like image 195
EvilDr Avatar answered Feb 08 '23 23:02

EvilDr