c# - 尝试加载 Crystal Reports 运行时时出错

标签 c# asp.net .net crystal-reports windows-server-2008-r2

我已经在内部网站上工作了一段时间,为客户维护它。 除了一些错误,该网站按预期运行。

但是,突然之间,出现了相关错误。这在以前从未发生过。

这是我们使用的软件:

  • Windows Server 2008 R2,64 位
  • Visual Studio 2005 作为首选 IDE
  • 网站的 ASP.net/C#
  • .NET 2.0
  • IIS,用于网站托管。
  • CrystalReport10,它会出现(从图片上看)。

现在,我对此做了一些研究,很多人建议将网站重新构建/发布为 x86 而不是 any CPU,还有很多的人还建议重新安装 64 位 CR 等等。

但同样,这以前从未发生过,而且很少有人真正篡改服务器。我看不出为什么这个早在我的时代之前就使用“混合平台”构建的网站会突然停止在它部署到的操作系统上运行,也早于我的时代。由于没有其他人使用该服务器,它怎么会突然产生这样的错误?这不像有人可以进入那里并卸载东西 - 也许是 Windows 更新?

这是我在操作系统 C:\Windows\Assembly 中找到的屏幕截图:

Windows Server 2008

奇怪的是,我在我的本地测试开发 PC 上发现了同样的东西,为我正在处理的另一个程序添加了一些版本 13 的部分。该网站在我的本地测试开发人员上运行良好。在实时服务器上,它没有。在我假设也许我有一些服务器没有的必需品之前,我还让自己记住实时服务器上的任何东西已经存在了一段时间 - 错误现在才开始发生。

这里是完整的错误:

Server Error in '/' Application.

An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[LoadSaveReportException: An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information.]
CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() +379 CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +248

[TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.]
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0
pages_reports_ApplicationHistoryRpt.GenerateReport() +163
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5420

我希望有人能帮我解决这个问题。

谢谢。

最佳答案

您是否尝试过进入 IIS 并在网站运行的应用程序池的高级设置中将“启用 32 位应用程序”设置为“True”?

我必须为我在 Web 应用程序中引用的 Crystal Reports 2008 (12.0.2000.0) 版本执行此操作,因为 Crystal 运行时本身只有 32 位。

关于c# - 尝试加载 Crystal Reports 运行时时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19286630/

相关文章:

.net - 如何获取托管对象的引用计数?

c# - 开关盒内部的条件中断

c# - 以编程方式从 gmail 下载电子邮件(备份)

javascript - 需要时突出显示带有红色边框的文本框

c# - MEF 导入组合问题

c# - GC.Collect() 和 GC.Collect(GC.MaxGeneration) 有什么区别?

c# - C#中填充矩形数组的扩展方法

c# - 自动生成ID

asp.net - 重构以将业务逻辑与隐藏代码分离

c# - 发送电子邮件的正确代码,asp.net