[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

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?
0
troycomp
Asked:
troycomp
1 Solution
 
dj_alikCommented:
1. setup drivers if network printer on server  and set shared name
2. set IIS pool identity to local system

 
0
 
troycompAuthor Commented:
abandoned the project
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now