I created a .NET application to run on an application server that receives report requests and prints the requested report.
The C # application uses Crystal Reports to download the report and print it out later.
The application runs on the server to which the remote desktop connection is connected under a specific user account (required for older applications). When I disconnect from the Remote Session, the application begins to throw exceptions, such as:
Message: CrystalDecisions.Shared.CrystalReportsException: Report loading error
This type of error never occurs with an active remote session. The server on which the application is running is running Windows Server 2003, my field that creates the connection is Windows XP.
I understand that this is rather strange, however, I see no problems with creating the application that I created.
Does anyone know what could be causing this problem?
EDIT: I removed the bullet and created the application as a Windows service, it is obvious that this will not take much time, I just was not sure that this would solve the problem. In any case, this is not so.
I also tried to remove the multi-threaded code that asynchronously called the print function. I did this to just an application and narrow down the reason why it might fail. In any case, this also did not improve the situation!
EDIT: Two errors I get:
System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified. in CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName (String newVal) in CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName (String value) with Dsa.PrintServer.Service.Service.Print Report
The printer is not invalid, this is confirmed when after 60 seconds the time is ticking and the report prints successfully.
and
The request could not be sent with background processing. in CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber (RequestContext pRequestContext) in CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber (ReportPageRequestContext.ReportDotErnterectrecessStreetStrecessStrectureStreckStreamStrecessStrectureStreckStreetReportStrecessStream EromReportSourceBase.GetLastPageNumber (ReportPageRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter (Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN) CrystalPrementPricePrintPricePrintPricePrint.RenReportPrint.Prevent.EntreReport.EntreReport. Int32 endPageN) at Dsa.PrintServer.Service.Service.PrintCrystalReport (Report Report)
EDIT:
I ran the mon file to check if there is a problem with access. At the moment when an error occurs with mon reports files
Request: OPEN | Path: C: \ windows \ assembly \ gac_msil \ system \ 2.0.0.0__b77a5c561934e089 \ ws2_32.dll | Result: NOT FOUND | Other: Attribute Error