Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8208125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:14:10+00:00 2026-06-07T09:14:10+00:00

I have a @font-face defined in my site’s cascading style sheet. This font loads

  • 0

I have a @font-face defined in my site’s cascading style sheet. This font loads fine when I browse to the site locally (served by IIS Express). However, when loading my application from my remote server (IIS 7.5) the reference to this font causes an internal server 500 error. Why does the below style work locally, but not on the server?

@font-face {
    font-family: DejaVu Sans Mono;
    src: url('../fonts/DejaVuSansMono.ttf');
}

header h1
{
    font-family: 'DejaVu Sans Mono';
    font-size: 3em;
    padding: 0;
    margin: 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:14:11+00:00Added an answer on June 7, 2026 at 9:14 am

    If you check you will discover that the DejaVuSansMono.ttf file is not being copied to your server. Since it’s not being copied the font file is not there for IIS 7.5 to provide. It works locally because IIS Express is able to find the file in the local directory.

    File types that Visual Studio does not recognize have their BuildAction Property set to None by default; font files are one such unrecognized type. Having a BuildAction of none means that Visual Studio will ignore this file when building your application. There are several out of the box options for the BuildAction Property:

    • None – The file is not included in the project output group and is not compiled in the build process. An example is a text file that
      contains documentation, such as a Readme file.
    • Compile – The file is compiled into the build output. This setting is used for code files.
    • Content – The file is not compiled, but is included in the Content output group. For example, this setting is the default value
      for an .htm or other kind of Web file.
    • Embedded Resource – This file is embedded in the main project build output as a DLL or executable. It is typically used for resource
      files.

    The most appropriate BuildAction Property setting for DejaVuSansMono.ttf is Content. By setting the BuildAction this way the file will be copied to your remote server. Unfortunately, this manual process will have to be repeated for each file with an unrecognized file type which sets developer’s up for a tedious an error prone process. Thankfully, Andre Loker has a great blog post on setting the default build action for non-default file-types in Visual Studio.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some @font-face webfonts on my site. The fonts and the CSS code
So I have this stack: @font-face { font-family: 'MyCustomFont'; src: url('MyCustomFont.ttf') format('truetype'); } body
I have an @font-face rule, and its look like this: @font-face{ font-family:'F'; src:url() format(embedded-opentype),
Possible Duplicate: @font-face not working on a client site? I have the following font
I have embedded my custom fonts in html with @font-face. This working with all
I have a problem with CSS3 property for using my own fonts @font-face. In
My problem is simple, I have the font set in the body style to
I have added a font to a site, added the CSS and uploaded the
I have generated a @font-face with FontSquirrel, and resulted these (tweaked later) rules: @font-face
I'm using Font face to display Thonburi font on website http://www.mastersofbackgammon.net/site (English version) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.