[Solved] Custom font works locally but not on server after deployment in IIS

on Sep 22, 2021 07:10 AM

i have problem with my host name when i run the page from localhost (IIS Express) font work with report viwer

when i upload my project to host server font not working in report viewer

when i add in  master page font only work with page

<style type="text/css">
    body {
        font-size: 14pt;
        font-weight: bold;
    @font-face {
        font-family:PT Heading;
        src: url("~/Fonts/Ptbldhad.ttf");
        src: local("PT Heading"), url(~/Fonts/Ptbldhad.ttf) format("truetype");
    page {
        text-align: center;

also i have old  project WinForm VB.NET same report viwer with tax and report and run same host name working very well

Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Sep 23, 2021 06:12 AM
on Feb 11, 2022 11:05 AM

The ttf file is not being copied to your server. Since it's not being copied the font file is not there for IIS to provide. It works locally because IIS Express is able to find the file in the local directory.