Good afternoon, I created a website in Visual Studio 2005 that generates reports in Crystal Reports in PDF format. On my machine it all works perfectly, but after publishing the website on the server by clicking on the button that generates the report the following error:
Invalid class string
Description: An unhandled exception when you run the current web request. Check the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Invalid class string
Error source:
There has been no exception during the execution of the current web request. Information on the origin and location of the exception can be identified using the exception stack trace below.
Stack trace:
[COMException (0x80004005): Invalid class string
]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open (Object & DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open (Object & DocumentPath, Int32 Options) +87
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened () +279
[Exception: Unable to load the report.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened () +340
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load (String filename, OpenReportMethod openMethod, Int16 parentJob) +870
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load (String filename) +73
descargas.traerenvios (String type) +766
descargas.btnenviospdf_Click (Object sender, ImageClickEventArgs e) +11
System.Web.UI.WebControls.ImageButton.OnClick (ImageClickEventArgs e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent (String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent (NameValueCollection postdata) +33
System.Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
________________________________________
Information: Release of Microsoft. NET Framework: 2.0.50727.832; ASP.NET Version: 2.0.50727.832
I tried to create a WebSetup with the merge modules for Crystal Reports (CrystalReportsRedist2005_x86.msm) and also adding to the prerequisites installer Crystal Reports, and even installing the Crystal Reports for VS. NET 2005 - Redistributable (CRRedist2005_x86.msi) in the server, but still displayed the same error. Could you help me solve the problem?
Thank you very much, a greeting.