现在的位置: 首页 > 综合 > 正文

水晶报表 关于错误未能加载文件或程序集“CrystalDecisions.ReportAppServer.ClientDoc”或它的某一个依赖项。试图加载格式不正确的程序

2013年09月16日 ⁄ 综合 ⁄ 共 4115字 ⁄ 字号 评论关闭

项目是一个师兄给我看的,在配置过程中的问题如下:

自己装的系统是win7 64bit sp1,vs2010,先是安装了CRforVS_redist_install_64bit_13_4,运行后错误如下:


错误是未能加载文件或程序集“CrystalDecisions.ReportAppServer.ClientDoc”或它的某一个依赖项。试图加载格式不正确的程序。  

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。  

异常详细信息: System.BadImageFormatException: 未能加载文件或程序集“CrystalDecisions.ReportAppServer.ClientDoc”或它的某一个依赖项。试图加载格式不正确的程序。

源错误:  

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。   

程序集加载跟踪: 下列信息有助于确定程序集“CrystalDecisions.ReportAppServer.ClientDoc”未能加载的原因。


=== 预绑定状态信息 ===
日志: 用户 = wz-PC\wz
日志: DisplayName = CrystalDecisions.ReportAppServer.ClientDoc
 (Partial)
警告: 为程序集提供了部分绑定信息:
警告: 程序集名称: CrystalDecisions.ReportAppServer.ClientDoc | 域 ID: 2
警告: 当仅提供程序集显示名称的一部分时,将发生部分绑定。
警告: 这可能导致联编程序加载错误的程序集。
警告: 建议为程序集提供完全指定的文字标识,
警告: 并由简单名称、版本、区域性和公钥标记组成。
警告: 有关此问题的详细信息和常见解决方案,请参见白皮书 http://go.microsoft.com/fwlink/?LinkId=109270。
日志: Appbase = file:///E:/xxw/kuangshan/
日志: 初始 PrivatePath = E:\xxw\kuangshan\bin
调用程序集: (Unknown)。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: E:\xxw\kuangshan\web.config
日志: 使用主机配置文件:  
日志: 使用 C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config 的计算机配置文件。
日志: 此时没有为引用应用策略(私有、自定义、分部或基于位置的程序集绑定)。
日志: 尝试下载新的 URL file:///C:/Users/wz/AppData/Local/Temp/Temporary ASP.NET Files/root/f5a1316b/2efac900/CrystalDecisions.ReportAppServer.ClientDoc.DLL。
日志: 尝试下载新的 URL file:///C:/Users/wz/AppData/Local/Temp/Temporary ASP.NET Files/root/f5a1316b/2efac900/CrystalDecisions.ReportAppServer.ClientDoc/CrystalDecisions.ReportAppServer.ClientDoc.DLL。
日志: 尝试下载新的 URL file:///E:/xxw/kuangshan/bin/CrystalDecisions.ReportAppServer.ClientDoc.DLL。
错误: 未能完成程序集的安装(hr = 0x8007000b)。探测终止。

 

堆栈跟踪:  


[BadImageFormatException: 未能加载文件或程序集“CrystalDecisions.ReportAppServer.ClientDoc”或它的某一个依赖项。试图加载格式不正确的程序。]
  System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean
throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0

  System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean
throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39

  System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean
suppressSecurityChecks) +132

  System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
  System.Reflection.Assembly.Load(String assemblyString) +28
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: 未能加载文件或程序集“CrystalDecisions.ReportAppServer.ClientDoc”或它的某一个依赖项。试图加载格式不正确的程序。]
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
  System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
  System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
  System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
  System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
  System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
  System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters
hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677


[HttpException (0x80004005): 未能加载文件或程序集“CrystalDecisions.ReportAppServer.ClientDoc”或它的某一个依赖项。试图加载格式不正确的程序。]
  System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9088828
  System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
  System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258

几经尝试失败后,我又下了一个CRforVS_13_0_4(288M)(地址:http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp),调试后成功。


个人愚见:对这个东西不太懂,我觉得 CRforVS_redist_install_64bit_13_4是为了引入水晶报表所需要的dll库,而CRforVS_13_0_4除了引入所需的库之外,还有这些库运行环境的配置。这些纯属是个人愚见,肯定会贻笑大方,望对这些知识了解多的同胞们不惜赐教啊


抱歉!评论已关闭.