We're using PrintDocument.Print method in a web application to print (ie not
on the client) (on Windows 2003)
Get InvalidPrinterException:
System.Drawing.Printing.InvalidPrinterException: Tried to access printer
'\\SAM\BrotherH' with invalid settings. at
System.Drawing.Printing.PrinterSettings.GetHdevmod eInternal() at
System.Drawing.Printing.PrinterSettings.GetHdevmod e(PageSettings
pageSettings) at
System.Drawing.Printing.PrintController.OnStartPri nt(PrintDocument document,
PrintEventArgs e) at
System.Windows.Forms.PrintControllerWithStatusDial og.OnStartPrint(PrintDocum
ent document, PrintEventArgs e) at
System.Drawing.Printing.PrintController.Print(Prin tDocument document) at
System.Drawing.Printing.PrintDocument.Print() at
PrintingGDI.WebForm1.Button1_Click(Object sender, EventArgs e)
We impersonate a windows user with enough privelages to print on network
printers.
Code works on Windows 2000 Server, and even to local printer on Windows
2003.
Any ideas what might be different when asp.net runs under II6 on 2003 Server
?
Thanks