Hello,
i made a very simple page using Crystal Reports for out ASP.NET Application.
Locally on my development machine the Report loads fine, without a problem. Though trying the same page on a Windows Server 2008 R2, i get the following error:
Vorgang wird nicht unterstützt. Ein durch die JRC-Engine bearbeitetes Dokument kann nicht im C++ Stack geöffnet werden.
Beschreibung: Unbehandelte Ausnahme beim Ausführen der aktuellen Webanforderung. Überprüfen Sie die Stapelüberwachung, um weitere Informationen über diesen Fehler anzuzeigen und festzustellen, wo der Fehler im Code verursacht wurde.
Ausnahmedetails: System.Runtime.InteropServices.COMException: Vorgang wird nicht unterstützt. Ein durch die JRC-Engine bearbeitetes Dokument kann nicht im C++ Stack geöffnet werden.
Quellfehler:
Zeile 23: FileStream test = File.Open(Server.MapPath(@"Reports\reportname.rpt"), FileMode.Open, FileAccess.Read);
Zeile 24: test.Close();
Zeile 25: this.CrystalReportSource1.ReportDocument.Load(Server.MapPath(@"Reports\reportname.rpt"));
Zeile 26: SqlConnectionStringBuilder sb;
Zeile 27: try
Quelldatei: d:\Couplink\Portal\ReportTest.aspx.cs Zeile: 25
Stapelüberwachung:
[COMException (0x80041811): Vorgang wird nicht unterstützt. Ein durch die JRC-Engine bearbeitetes Dokument kann nicht im C++ Stack geöffnet werden.]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +147
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +431
[CrystalReportsException: Bericht konnte nicht geladen werden.]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +558
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ProductLocaleID() +42
CrystalDecisions.ReportSource.CachedObjectReportSource.GetReport(RequestContext context, Boolean bAddToCacheWhenCreated) +743
CrystalDecisions.Web.CrystalReportSource.get_ReportDocument() +327
CYM.ReportTest.Page_Load(Object sender, EventArgs e) in d:\Couplink\Portal\ReportTest.aspx.cs:25
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
Versionsinformationen: Microsoft .NET Framework-Version:4.0.30319; ASP.NET-Version:4.0.30319.17929
The error translates to "A document processed by the JRC engine cannot be opened in the C++ stack.".
Information about the Server:
Windows Server 2008 R2
64bit
IIS 7.5
I did not pre-compile the application but deployed the source files and used the IIS built-in compiler. Which to my knowledge compiles as 64bit if i do not explicitly enable support for 32bit apps in the applicationpool.
I installed CRforVS_redist_install_32bit_13_0_9 as well as CRforVS_redist_install_64bit_13_0_9.
First "weirdness" i encountered is, that even after installing those files, the IIS couldn't find the necessary DLLs that were referenced in the web.config.
Here is the corresponding part of the web.config:
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="CrystalDecisions.ReportAppServer.XmlSerialize, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="SAPBusinessObjects.WPF.ViewerShared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.VSDesigner, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Data.AdoDotNetInterop, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ObjectFactory, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="FlashControlV71, Version=1.0.3187.32366, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.Prompting, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.CommonObjectModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.CubeDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="ShockwaveFlashObjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.TemplateEngine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.CommonControls, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ReportDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="SAPBusinessObjects.WPF.Viewer, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.DataSetConversion, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CRVsPackageLib, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Design, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
I solved this by manually uploading the DLLs from my development machine to the bin directory of the website. Then i could at least compile the website.
Now when i open the Page "ReportTest.aspx" I get the beforementioned error.
I already copied the aspnet_client from the inetpub/wwwroot directory into the root directory of the website.
I tried with 32bit enabled and disabled in the Applicationpool.
I tried with an CR XI report, CR13 report and an "empty" CR 13 report, which was supposed to only show a "Test" text. Neither worked.
The Apppool has full access to c:/Windows/Temp and the directory in which i put the reports, since i gave everyone full access to those paths.
I also put in two lines that open and close the report for binary reading to test for file access.
I looked upon dozens of threads and tried whatever would apply to my situation without success.
I sincerely hope you can help me.
Best regards,
Marc Gehlen