Get installed printers using System.Drawing.Printing.PrinterSettings.InstalledPrinters

Posted on 2006-05-22
Last Modified: 2008-01-09

I'm using ASP.NET 2005 with VB.NET.  I’m trying to display all printers installed on my laptop using the drop down list control.  The following code does not display the installed printer on the server at "\\Beatles\Dell Photo AIO Printer 922"

        ddlPrinter.DataSource = System.Drawing.Printing.PrinterSettings.InstalledPrinters

Any Suggestions?

Question by:DeniseGoodheart
    LVL 33

    Expert Comment

    Unless your laptop is the webserver, you aren't going to retrieve a list of client printers using that method.  In fact, there is no way to do that using

    Author Comment

    Hi raterus,

    My laptop is the webserver.  I thought it was some how possible because it displays the printer Microsoft Office Document Image Writer wtihin the drop down list control, but not the \\Beatles\Dell Photo AIO Printer 922.  When I print from my laptop, it uses \\Beatles\Dell Photo AIO Printer 922


    LVL 33

    Accepted Solution

    Probably because the printer isn't installed for the ASPNET or NETWORK SERVICE account.  Depending on the authentication model you've selected for your application, you may be able to add <identity impersonate="true" /> to web.config and see the printers your account would have on the computer.  You'd have to be using integrated windows authentication for this to make a difference.  This is all a longshot guess, since I've never had to write code to display available printers on the server.


    Author Comment

    Hi Raterus,

    Thanks for your comment.  I'm working on a Web project that requires I use Crystal Reports .NET 2005.  I found out today that the reports need to be available for the Internet, and not just an Intranet application.  So finding available printer servers is no longer necessary.  So now I need to figure out how to make printing available for Internet users, so I'll post a new question.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 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

    11 Experts available now in Live!

    Get 1:1 Help Now