Solved

Send Print jobs through IIS

Posted on 2011-09-30
2
258 Views
Last Modified: 2012-05-12
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
Comment
Question by:troycomp
2 Comments
 
LVL 18

Accepted Solution

by:
dj_alik earned 500 total points
ID: 36896027
1. setup drivers if network printer on server  and set shared name
2. set IIS pool identity to local system

 
0
 

Author Closing Comment

by:troycomp
ID: 36982291
abandoned the project
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why Does This Page Not Show Up? 4 24
Vb.net dynamic formulas in runtime 11 63
Angular - break the dataset in chunks? 7 39
Help with C#, MVC, razor. 6 23
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now