TypeInitializerException抛出的ReportDocument构造 [英] TypeInitializerException thrown by ReportDocument constructor

查看:166
本文介绍了TypeInitializerException抛出的ReportDocument构造的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP .NET Web应用程序里面有提到,从32位的Crystal Reports运行时组件。 (安装了CRRedist2008_x86.msi) 在其已部署的服务器有一个64位的Crystal Reports运行。 包含的CrystalReportViewer的形式抛出以下异常:

I have an ASP .NET web application which has references to assemblies from the 32-bit Crystal Reports runtime. (Installed from CRRedist2008_x86.msi) The server on which it has been deployed has a 64-bit Crystal Reports runtime. The form containing the CrystalReportViewer throws the following exception:

System.TypeInitializationException:的类型初始   CrystalDecisions.CrystalReports.Engine.ReportDocument'抛出   例外。 ---> System.UnauthorizedAccessException的:检索COM   类工厂具有CLSID组件   {5FF57840-5172-4482-9CA3-541C7878AE0F}失败由于以下   错误:80070005。在   CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() - 完   内部异常堆栈跟踪---在   CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()在   [qualifiedFormName] _Load(对象发件人,EventArgs五)

System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {5FF57840-5172-4482-9CA3-541C7878AE0F} failed due to the following error: 80070005. at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() --- End of inner exception stack trace --- at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() at [qualifiedFormName]_Load(Object sender, EventArgs e)

虽然我认识到,使得开发环境相同的运行时环境将理想的解决方案,我希望有一些方法来解决此无需升级的开发环境。

While I realize that making the dev environment identical to the runtime environment would the ideal solution, I was hoping there were some way to resolve this without having to upgrade the development environment.

会更新引用到Crystal Reports组件在web.config中服务器上的工作?

Would updating the references to Crystal Reports assemblies in web.config on the server work?

推荐答案

  • 开启windows的注册表器(Regedit.exe)
  • 搜索5FF57840-5172-4482-9CA3-541C7878AE0F
  • 您应该找到一把钥匙,展开它,去到每个子节点,直到您找到安装路径。
  • 进入该路径(通常是C:\程序\ Business Objects公司... \ bin中......)
  • 授予完全权限的ASP .NET,IIS工作进程,匿名Web用户进程帐户

  • Open windows registry (Regedit.exe)
  • Search for 5FF57840-5172-4482-9CA3-541C7878AE0F
  • You should find a key, expand it and go to each child nodes until you find the installation path.
  • Go to that path (usually C:\Program ...\Business Objects...\bin...)
  • Grant full permission for ASP .NET, IIS worker process, Anonymous Web User process accounts

    您应该是好去。

    这篇关于TypeInitializerException抛出的ReportDocument构造的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆