I'm trying to deploy a web application which references http://fortawesome.github.io/Font-Awesome/
Everything works great locally, but when I deploy I receive several 500 errors.
> GET
> http://localhost/csweb/Content/font_awesome/font/fontawesome-webfont.ttf
> 500 (Internal Server Error)
> GET
> http://localhost/csweb/Content/font_awesome/font/fontawesome-webfont.woff
> 500 (Internal Server Error)
> GET
> http://localhost/csweb/Content/font_awesome/font/fontawesome-webfont.svg#fontawesomregular
> 500 (Internal Server Error)
A quick search of StackOverflow lead me to this thread: Why is @font-face throwing a 404 error on woff files?
as such I added to my web.config file:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
...
I see IIS reflecting these changes after calling iisreset, but no effect was seen on the deployed application.
I'm not finding any other obvious answers -- anyone know anything I don't?
Oh hey, I figured it out almost immediately afterward. I need to add the following lines to web.config:
<httpHandlers>
<add verb="GET" path="*.woff" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.ttf" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.svg" type="System.Web.StaticFileHandler" />
...