Printing From a WebService No printers are installed.

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

ASP.NET 3.5

I am trying to print from a Webservice on Windows 2003 box, but I am getting
the following error when I try to print
I have tried the following solution but it did not help
http://support.microsoft.com/?kbid=184291
(I have a local and a network printer installed)

Is there a fix for this problem or should I be using different solution for
printing on the server?

The Error:

System.Drawing.Printing.InvalidPrinterException: No printers are installed.

at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal()

at System.Drawing.Printing.PrinterSettings.GetHdevmode()

at System.Drawing.Printing.PageSettings.GetPaperSize(IntPtr modeHandle)

at System.Drawing.Printing.PageSettings.get_PaperSize()

at
CrystalDecisions.CrystalReports.Engine.PrintOptions.FindPaperSize(PrinterSettings
printer, PaperSize size)

at
CrystalDecisions.CrystalReports.Engine.PrintOptions.CopyTo(PrinterSettings
printer, PageSettings page)

at
CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32
nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)





Thank You





Peter
 
When your server runs the ASP.Net code, it runs in a separate user account (not one that that you log into)... that user account probably doesn't have any printers installed, eventhough the user accont you log in with on the server does. (I'm not sure exactly which account it is but you can Google it).
 
Back
Top