Printing issue

  • Thread starter Thread starter laguna.noir
  • Start date Start date
L

laguna.noir

Hello all

When printing from Enterprise Service I've got strange exception:

System.ComponentModel.Win32Exception: The operation completed
successfully

Server stack trace:
at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal()
at System.Drawing.Printing.PrinterSettings.GetHdevmode(PageSettings
pageSettings)
at
System.Drawing.Printing.PrintController.OnStartPrint(PrintDocument
document, PrintEventArgs e)
at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint(PrintDocument
document, PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument
document)
at System.Drawing.Printing.PrintDocument.Print()

It appears only when printing on some printers, with others it works
well. Also, I tried to print the same image on the same printer using
the standard Windows image viewer and had no any problems. What could
be the source of this exception?
 
Hello all

When printing from Enterprise Service I've got strange exception:

System.ComponentModel.Win32Exception: The operation completed
successfully

Server stack trace:
at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal()
at System.Drawing.Printing.PrinterSettings.GetHdevmode(PageSettings
pageSettings)
at
System.Drawing.Printing.PrintController.OnStartPrint(PrintDocument
document, PrintEventArgs e)
at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint(PrintDocu­ment
document, PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument
document)
at System.Drawing.Printing.PrintDocument.Print()

It appears only when printing on some printers, with others it works
well. Also, I tried to print the same image on the same printer using
the standard Windows image viewer and had no any problems. What could
be the source of this exception?

Are you trying to print to a local printer from ASP.NET?
 
Are you trying to print to a local printer from ASP.NET?- Hide quoted text -

- Show quoted text -

No. I'm trying to print to the network printer and not from ASP.NET
yet. By security requirements we moved printing logic to the
Enterprise Service (COM+ component) which is being called from
ASP.NET. The web page passes network printer name and the file to
print as parameters of the method and the Enterprise Service do the
job. The network printer is accessible from the web-server, that's for
sure. I successfully printed being logged in to the server as the same
account as Enterprise Service is running.
 
Are you trying to print to a local printer from ASP.NET?- Hide quoted text -

- Show quoted text -

No. I'm trying to print to the network printer and not from ASP.NET
yet. By security requirements we moved printing logic to the
Enterprise Service (COM+ component) which is being called from
ASP.NET. The web page passes network printer name and the file to
print as parameters of the method and the Enterprise Service do the
job. The network printer is accessible from the web-server, that's for
sure. I successfully printed being logged in to the server as the same
account as Enterprise Service is running.
 
Back
Top