I made one page where barcode is displaying perfectly when i am running it local. but its not working when i uploaded it into the site. please help me out.
Barcode is not displaying after hosting it online
protected void Page_Load(object sender, EventArgs e)
{
string Code = Request["code"].ToString();
int w = Code.Length * 40;
Bitmap oBitmap = new Bitmap(w, 100);
Graphics oGraphics = Graphics.FromImage(oBitmap);
Font oFont = new Font("IDAutomationHC39M", 18);
PointF oPoint = new PointF(2f, 2f);
SolidBrush oBrushWrite = new SolidBrush(Color.Black);
SolidBrush oBrush = new SolidBrush(Color.White);
oGraphics.FillRectangle(oBrush, 0, 0, w, 100);
oGraphics.DrawString("*" + Code + "*", oFont, oBrushWrite, oPoint);
Response.ContentType = "image/jpeg";
oBitmap.Save(Response.OutputStream, ImageFormat.Jpeg);
}
here in page load i am making the barcode generation and i am calling it in other page
just providing like
imgbarcode.ImageUrl = "BarCode.aspx?code=" + objCustomerBasicinfo.CustomerId;
and i copied IDAutomationHC39M.ttf IN C DRIVE windows fonts folder.
its working fine in local, but not in online