locked
Printing Exception: Operation Completed Successfully thrown by System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint() RRS feed

  • Question

  • User1661159748 posted

    A clint has asked me to fix a print problem that's recently hit them (I think they may have installed the .Net 2.0 framework).  The error does not occur when I run the code on my machine, only theirs. 

    when a PrintDocument.Print() proc is called, it throws an exception and does not print. The error message in the exception is:

    Error: System.ComponentModel.Win32Exception: The operation completed successfully
    at System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint
                                                      (PrintDocument document, PrintEventArgs e)
    at System.Drawing.Printing.PrintController.Print(PrintDocument document)
    at System.Drawing.Printing.PrintDocument.Print()

    I've tried switching the printers that it is printing to (including a PDF virtual printer driver), but the error keeps coming back. The PrintDocument object has successfully passed PrintDocument.PrinterSetttings.IsValid() when I send it off to be printed.

    It looks like someone has documented a similar problem on Microsoft's Foums but I didn't find any information there to fix my issue. I'm fresh out of ideas on how to solve this. Has anyone encountered this before?

    Thursday, October 12, 2006 7:25 PM

All replies

  • User1838686340 posted
    Check whether the account in which the application runs(ASPNET or so) has printing permissions. Go to Printers and Faxes. Right click on the printer and see the Security tab.
    Friday, May 11, 2007 1:18 PM
  • User1215071375 posted

    I am having a similar issue and what I noticed is that if the web application is set up with impersonation then the print functionality doesn't work. If we take off impersonation then it works.

    How can I setup impersonation on my applicatiod and yet print to the printer.

    Thank you,

     

    Friday, December 18, 2009 2:31 PM