Hi doc.print() is not working in iis 7 and windows 7 when my site hosted..

PrintVisitorEntry() {
PrintDocument doc = new PrintDocument();
doc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(Visitor_Print);
doc.Print();
void Visitor_Print(object sender, System.Drawing.Printing.PrintPageEventArgs e)
DataTable dt = new DataTable();
PrintVisitorEntry_Graphics(dt, e, 1);
PrintVisitorEntry_Graphics(dt, e, 1)
Point loc = new Point(100, 100);
e.Graphics.DrawImage(img, 0, 90, 80, 80);
int startX = 10;
int startY = 10;
int offset = 5;
graphic.DrawString("---------------------------------------------------------------------", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("LOT MOBILES VISITOR PASS".PadLeft(38), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 40;
graphic.DrawString("---------------------------------------------------------------------", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("S.NO ".PadLeft(50) + "808808809", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 35;
graphic.DrawString("Visitor Name ".PadLeft(35) + txtVisitorName.Text.PadLeft(20), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Phone ".PadLeft(28) + txtmobilenumber.Text.PadLeft(27), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Employee Name ".PadLeft(36) + "Mr.Satyanarayana", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Dept ".PadLeft(27) + "Admin".PadLeft(25), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Allow To ".PadLeft(31) + txtAllowTo.Text.PadLeft(20), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Pass Validity ".PadLeft(36) + " ", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Check In Time ".PadLeft(36) + "2103/08/27 8.00 PM".PadLeft(23), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Visitor Belongings ".PadLeft(41) + "Mobile", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Issued By ".PadLeft(33) + "LOT Security(Mr.Said)".PadLeft(33), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("Employee Sign".PadRight(20) + "*808808809*".PadLeft(20), font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
graphic.DrawString("----------------------------------------------------------------------", font, new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + 20;
protected void btnPrint_Click(object sender, EventArgs e)
PrintVisitorEntry();
using above code it is working fine in development but when i hosted the asp.net 4.0 site in iis 7 only that print is not responding
no error and no exceptions...Please Provide the suggestions.....Thank You
Advertisement
Reply

I'd ask in http://forums.iis.net/
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog:http://unlockpowershell.wordpress.com
My Book:Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})