本文轉自:https://www.cnblogs.com/shangwater/p/5449470.html
錯誤:程式集系結日志記錄被關閉,
解決方法:
將IIS中的應用程式服務池中"啟動32位應用程式"設定為true,
錯誤描述:
部署到IIS中的應用程式出現如下錯誤(Win7 x64位 .net 4.0):
"/AppShip"應用程式中的服務器錯誤,

未能加載檔案或程式集"AppShip.Web"或它的某一個依賴項,試圖加載格式不正確的程式,
說明: 執行當前 Web 請求期間,出現未經處理的例外,請檢查堆疊跟蹤資訊,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細資訊,
例外詳細資訊: System.BadImageFormatException: 未能加載檔案或程式集"AppShip.Web"或它的某一個依賴項,試圖加載格式不正確的程式,
源錯誤:
執行當前 Web 請求期間生成了未經處理的例外,可以使用下面的例外堆疊跟蹤資訊確定有關例外原因和發生位置的資訊, |
程式集加載跟蹤: 下列資訊有助于確定程式集"AppShip.Web"未能加載的原因,
警告: 程式集系結日志記錄被關閉, 要啟用程式集系結失敗日志記錄,請將注冊表值[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)設定為 1, 注意: 會有一些與程式集系結失敗日志記錄關聯的性能損失, 要關閉此功能,請移除注冊表值 [HKLM\Software\Microsoft\Fusion!EnableLog], |
堆疊跟蹤:
[BadImageFormatException: 未能加載檔案或程式集"AppShip.Web"或它的某一個依賴項,試圖加載格式不正確的程式,] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17 System.Reflection.Assembly.Load(String assemblyString) +35 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +122
[ConfigurationErrorsException: 未能加載檔案或程式集"AppShip.Web"或它的某一個依賴項,試圖加載格式不正確的程式,] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +12845354 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +503 System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +142 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +148 System.Web.Compilation.BuildManager.ExecutePreAppStart() +172 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151
[HttpException (0x80004005): 未能加載檔案或程式集"AppShip.Web"或它的某一個依賴項,試圖加載格式不正確的程式,] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12966756 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12806561 |
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/12326.html
標籤:ASP.NET
