Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason my IIS won't return any font files. They all return as 404s. I have verified the URLs are correct and the MIME types are correct. The font files are currently inside of a .NET 4.5 project using MVC4. When I move the files outside of the project, into the server's root directory, it serves the files up fine. I have verified there aren't any overrides happening in the project's web.config to how the file extensions are handled.

So far this is happening for .TTF, .EOT, .SVG, and .WOFF files. Other static files, in the same directory, are returned fine. Is there some setting in IIS8.5 that prevents the font files from being returned?

I have attached a log file which was generated by the failed request tracking.

https://dl.dropboxusercontent.com/u/39382497/fr000001.xml

share|improve this question
    
I just installed IIS8.5 to check, and the MIME types for those files are certainly registered by default. Have you checked the file permissions on the font files? Have you tried explicitly adding the relevant MIME types for your web site? –  Andrew Morton May 16 at 18:25
    
I've moved the files into a different directory at the same level, where static files are being returned, no help. I tried adding several different MIME type definitions as well to no avail. –  Chris Peterson May 17 at 2:04
    
If you move files they retain their file permissions. If you copy files they inherit the inheritable permissions of the location to copy them to. Of course, it is easier to just check the permissions on the file itself and compare them to a file which is served correctly. –  Andrew Morton May 17 at 20:20
    
The permissions are exactly the same. If it was a permissions issue, it wouldn't be throwing a 404, would it? –  Chris Peterson May 18 at 0:37
    
How annoying. Yes, it would give a 404 status if the permissions were wrong. An easy way to confirm that IIS is trying to retrieve the correct file is to use Process Monitor and filter on the filename, e.g. "abrilfatface-regular-webfont.svg". –  Andrew Morton May 18 at 8:45

1 Answer 1

up vote 0 down vote accepted

This issue seems to have fixed itself through the course of working on the project. Andrew Morton provided some excellent trouble shooting steps for anyone else having similar issues. I'll provide quick list:

  • Verify the correct MIME type is being used by the server. Using IIS Manager > Server > Project > MIME Types. Here are the list of MIME types that are working for me:

    • .eot = application/vnd.ms-fontobject
    • .svg = image/svg+xml
    • .ttf = application/octet-stream
    • .woff = application/x-font-woff
  • If That doesn't work verify the web server has permissions on the project folder and the folder storing the files. Following a tutorial will help a lot.

  • Futher debugging using a tool such as ProcessMonitor will help narrow down more stubborn server issues.

Hope this helps someone.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.