C# 无法加载文件或程序集';CrystalDecisions.ReportAppServer.ClientDoc';

C# 无法加载文件或程序集';CrystalDecisions.ReportAppServer.ClientDoc';,c#,asp.net,crystal-reports,C#,Asp.net,Crystal Reports,我正在asp.net中开发一个应用程序,其中我正在使用Crystal Reports。当我运行应用程序时,它会给我一个异常 无法加载文件或程序集 “CrystalDecisions.ReportAppServer.ClientDoc”或其 依赖关系。试图加载带有错误代码的程序 格式 堆栈跟踪 [BadImageFormatException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc'

我正在asp.net中开发一个应用程序,其中我正在使用Crystal Reports。当我运行应用程序时,它会给我一个异常

无法加载文件或程序集 “CrystalDecisions.ReportAppServer.ClientDoc”或其 依赖关系。试图加载带有错误代码的程序 格式

堆栈跟踪

[BadImageFormatException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   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: Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   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): Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9164848
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258

这看起来像是32/64位问题。这是在服务器上还是在开发机器上发生的?如果在您的机器上,请检查参考部件。例如,如果您的应用程序是64位的,并且您正在引用Crystal reports 2011中的组件,那么这可能是一个问题。在.NET中,您需要使用Crystal.NET组件

是否引用了dll??