Link to home
Start Free TrialLog in
Avatar of troycomp
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.GenericSerif, 10);
 float yPos = 10;
            float xPos = 25;
            e.Graphics.DrawString("Hello", 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?
ASKER CERTIFIED SOLUTION
Avatar of dj_alik
dj_alik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of troycomp
troycomp

ASKER

abandoned the project