المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : System.Drawing.Printing Issue



C# Programming
09-17-2009, 12:00 PM
When I Print from my computer life is good. when I print from the SQA computer life - not so good.
My box Windows XP sp 2
SQA Windows 2003 SE SP 2

Using the local system account results in the following error:

[2009/08/31 17:19:49.392] System.ComponentModel.Win32Exception Access is denied
File Name : Method : StandardPrintController.OnStartPrint Line Number : 0
File Name : Method : PrintControllerWithStatusDialog.OnStartPrint Line Number : 0
File Name : Method : PrintController.Print Line Number : 0
File Name : Method : PrintDocument.Print Line Number : 0
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrinterStrategy\LocalPrinter.cs Method : LocalPrinter.OutputContext Line Number : 71
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.printHelper Line Number : 94
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.Print Line Number : 44
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrintManager.cs Method : PrintManager.ProcessPrintRequest Line Number : 160

If I enter a specific user account, and validate Both RPC services are running, the error changes to:
[2009/09/03 10:10:06.595] System.ComponentModel.Win32Exception The RPC server is unavailable
File Name : Method : StandardPrintController.OnStartPrint Line Number : 0
File Name : Method : PrintControllerWithStatusDialog.OnStartPrint Line Number : 0
File Name : Method : PrintController.Print Line Number : 0
File Name : Method : PrintDocument.Print Line Number : 0
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrinterStrategy\LocalPrinter.cs Method : LocalPrinter.OutputContext Line Number : 71
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.printHelper Line Number : 94
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.Print Line Number : 44
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrintManager.cs Method : PrintManager.ProcessPrintRequest Line Number : 160


I am out of ideas, Any thoughts are welcome

The Framework code, StandardPrintController, causing me grief:
public virtual void OnStartPrint(PrintDocument document, PrintEventArgs e)
{
IntSecurity.AllPrintingAndUnmanagedCode.Assert();
this.modeHandle = document.PrinterSettings.GetHdevmode(document.DefaultPageSettings);
}


You can only be young once. But you can always be immature.
- Dave Barry