Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1084333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:32:55+00:00 2026-05-16T22:32:55+00:00

I need to send documents to a network printer (\myserver\myprinter). I’m using the System.Printing

  • 0

I need to send documents to a network printer (\myserver\myprinter). I’m using the System.Printing classes to print, and it works fine when it’s from a Windows Service, but from an ASP.NET app, it’s only able to print to local printers, not network printers. The error I’m getting is “Printer Name is not valid” This is what I’m using to get the printer name:

public string PrinterName
{
   using (LocalPrintServer server = new LocalPrintServer())
   return server.GetPrintQueue(@"\\myserver\myprinter");
}

What are my options here? Is this a permissions problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:32:55+00:00Added an answer on May 16, 2026 at 10:32 pm

    There are issues with credentials that you could solve by impersonation or elevating rights of the user the web app is running under.

    However, we did it by adding the network printer as a printer on the server (add printer dialogue on server) and having the job sent to that printer.

    We used the Printing.PrintDocument like so (Code in VB)….

    Public Class SpecialReportPrintJob
      Inherits Printing.PrintDocument
    
    Protected Overrides Sub OnBeginPrint(ByVal ev as Printing.PrintEventArgs)
      MyBase.OnBeginPrint(ev)
    
      Me.PrinterSettings.PrinterName = "PrinterNameUsedOnServer"
    
      'setup rest of stuff....
    End Sub  
    End Class
    'And we then call it like so
    Dim printSpecialReport as new SpecialReportPrintJob()
    printSpecialReport.Print()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the MS Word COM API to print Word documents from C#.
I need to send a GET request to another domain preferably using jQuery. This
We need send h264 from flash to Wowza and after to vlc by RTSP
I need send certain attributes(say, human readable user name) from server to client after
I've a custom form (created with form API) that need send an uploaded file
I need to send video stream between 2 mobile devices. Bada has no support
I need to send instant messages (like forum PMs) between users with my asp.net
I need to send an HTML report with images from an application. The report
I need to send some bytes over UDP Protocol the start squence is 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
I need to send some information on a VxWorks message queue. The information to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.