troycomp
asked on
Send Print jobs through IIS
I have a web application that prints a label to a network printer. The C# Code is simple:
var prnDocument = new PrintDocument {PrinterSettings = {PrinterName = "Network Printer"}};
prnDocument.PrintPage += PrintOrderLabels;
prnDocument.Print();
private void PrintOrderLabels(object sender, PrintPageEventArgs e)
{
var fnt = new Font(FontFamily.GenericSer if, 10);
float yPos = 10;
float xPos = 25;
e.Graphics.DrawString("Hel lo", fnt, Brushes.Black, xPos, yPos);
}
When I'm debugging in vs2010, i can print to the network printer all night. When I deploy my app in IIS, i cant print. I dont get an error and there is nothing in the event logs. I was using this exact same code to print to another network printer and it worked fine. I think there is a setting in IIS i havent changed in order to print to the new printer. The admin who setup the first printer is on vacation, so I dont know what he did in order to make the first printer work. Does anyone know how I can make the new printer print through IIS?
var prnDocument = new PrintDocument {PrinterSettings = {PrinterName = "Network Printer"}};
prnDocument.PrintPage += PrintOrderLabels;
prnDocument.Print();
private void PrintOrderLabels(object sender, PrintPageEventArgs e)
{
var fnt = new Font(FontFamily.GenericSer
float yPos = 10;
float xPos = 25;
e.Graphics.DrawString("Hel
}
When I'm debugging in vs2010, i can print to the network printer all night. When I deploy my app in IIS, i cant print. I dont get an error and there is nothing in the event logs. I was using this exact same code to print to another network printer and it worked fine. I think there is a setting in IIS i havent changed in order to print to the new printer. The admin who setup the first printer is on vacation, so I dont know what he did in order to make the first printer work. Does anyone know how I can make the new printer print through IIS?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER