4

我有一个不再运行的 Web 服务问题。之前安装的是 64 位版本,现在安装的是 32 位版本。但是,它似乎在寻找64位版本的ChilkatDotNet2.dll,这很奇怪。MSI 包安装的版本是 X86。

C:\Program Files (x86)\Sipp\Market Server\bin>asminfo.exe ChilkatDotNet2.dll ChilkatDotNet2, Version=9.3.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09b d | X86

我启用了 FusionLog,它给出了以下输出:

说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.BadImageFormatException:无法加载文件或程序集“ChilkatDotNet2”或其依赖项之一。试图加载格式不正确的程序。

源错误:

在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

程序集加载跟踪:以下信息有助于确定无法加载程序集“ChilkatDotNet2”的原因。

=== 预绑定状态信息 === LOG: User = SF\sonsupport LOG: DisplayName = ChilkatDotNet2 (Partial) LOG: Appbase = file:///C:/Program Files (x86)/Sipp/Market Server/ LOG :初始 PrivatePath = C:\Program Files (x86)\Sipp\Market Server\bin 调用程序集:(未知)。=== LOG:此绑定在默认加载上下文中开始。LOG:使用应用程序配置文件:C:\Program Files (x86)\Sipp\Market Server\web.config LOG:使用主机配置文件:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config LOG : 使用 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config 中的机器配置文件。LOG:此时未将策略应用于引用(私有、自定义、部分或基于位置的程序集绑定)。日志:正在尝试下载新的 URL 文件:///C:/Windows/Microsoft.NET/Framework64/v2。0.50727/临时 ASP.NET 文件/server/b8e4736f/d41d574d/ChilkatDotNet2.DLL。日志:正在尝试下载新的 URL 文件:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/server/b8e4736f/d41d574d/ChilkatDotNet2/ChilkatDotNet2.DLL。日志:正在尝试下载新的 URL 文件:///C:/Program Files (x86)/Sipp/Market Server/bin/ChilkatDotNet2.DLL。ERR:无法完成程序集的设置(hr = 0x8007000b)。探测终止。未能完成程序集的设置 (hr = 0x8007000b)。探测终止。未能完成程序集的设置 (hr = 0x8007000b)。探测终止。

堆栈跟踪:

[BadImageFormatException:无法加载文件或程序集“ChilkatDotNet2”或其依赖项之一。尝试加载格式不正确的程序。]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly .InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166 System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(字符串 assemblyName,布尔型 starDirective)+190

[ConfigurationErrorsException:无法加载文件或程序集“ChilkatDotNet2”或其依赖项之一。试图加载格式不正确的程序。]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11241896
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388 System.Web.Configuration .CompilationSection.LoadAssembly(AssemblyInfo ai) +232
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +48
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory虚拟目录)+191
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +54
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +295
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +476
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +116
System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath) +39
System .ServiceModel.HostingManager.GetCompiledCustomString(String normalizedVirtualPath) +202
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +33
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654

[ServiceActivationException:服务'/server/service.svc'由于编译过程中的异常而无法激活。异常消息是:无法加载文件或程序集“ChilkatDotNet2”或其依赖项之一。试图加载格式不正确的程序..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15778592
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15698937
System.ServiceModel.Activation.HostedHttpRequestAsyncResult .ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +227
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

4

1 回答 1

6

IIS > 应用程序池 > 您的应用程序池 > 高级设置 > 设置Enable 32bit application为 true。

于 2012-12-05T13:00:34.717 回答