Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Get the list of all printers from the local computer?

  Asked By: Marty    Date: Jun 29    Category: Asp.net    Views: 1740
  

How can I get the list of all printers from the local computer?
I use System.Drawing.Printing.PrinterSettings.InstalledPrinters
but this property only return the local printers and I want as well the
network printers added on the local computer.

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Garrett Brooks     Answered On: Jun 29

It's normal that all code that you execute in your code behind, won't do the
job, because it executes on the server and you only get server's printers. But I
am very sceptic about getting printer names with JavaScript... Maybe I'm wrong.

 
Answer #2    Answered By: Willis Hill     Answered On: Jun 29

I need the printer list  from the server.

 
Answer #3    Answered By: James Williams     Answered On: Jun 29

So,how can I get the list  of all printers from the server?
I use System.Drawing.Printing.PrinterSettings.InstalledPrinters
but this property  only return  the local  printers and I want as well the
network printers added  on the server computer.

If I call this property
from a windows applications it returns the entire printer list (network
printers as well).
So, how can I get the list of all the printers?

 
Answer #4    Answered By: Albert Ellis     Answered On: Jun 29

I think InstalledPrinters property  should also return  all network printers, but
you must enshure there are any for your Web app user (default ASPNET user).
Probably this is the problem.

 
Answer #5    Answered By: Dannon Jones     Answered On: Jun 29

You're going to need to switch ASP.Net over to a domain account which
has printer access in order to do this, as the ASPNet user will not have
any rights on a machine other than the webserver.

You can change the worker process' account in the processModel section
of the machine.config file.

 
Didn't find what you were looking for? Find more on Get the list of all printers from the local computer? Or get search suggestion and latest updates.




Tagged: