本文转自: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 |
如对本文有疑问, 点击进行留言回复!!
开发者们,鸿蒙HMS全球应用创新大赛喊你来拿100万美元大奖!
SqlServer在附加数据库时提示:无法打开物理文件**.mdf 操作系统错误拒绝访问
欧拉函数 - Visible Lattice Points - POJ 3090
网友评论