试图加载格式不正确的程序(Exception from HRESULT: 0x8007000B)

打开服务器上网站是出现如下错误:

试图加载格式不正确的程序。 (Exception from HRESULT: 0x8007000B)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: 试图加载格式不正确的程序。 (Exception from HRESULT: 0x8007000B)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[BadImageFormatException: 试图加载格式不正确的程序。 (Exception from HRESULT: 0x8007000B)]
   System.Data.Common.UnsafeNativeMethods.OCILobCopy2(IntPtr svchp, IntPtr errhp, IntPtr dst_locp, IntPtr src_locp, UInt64 amount, UInt64 dst_offset, UInt64 src_offset) +0
   System.Data.OracleClient.OCI.DetermineClientVersion() +297

[InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException.  This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.]
   ZFSoft.BusinessEntity.LoadFromSql(String sp, ListDictionary Parameters, CommandType commandType) +1659
   ZFSoft.BusinessEntity.LoadFromSql(String sp, ListDictionary Parameters) +72
   ZFSoft.DAL._SYS_USER.LoadByPrimaryKey(String ACCOUNT) in E:.....\ZFSoft.DAL\SYS_USER.cs:105
   Manage_Login.UserLogin(String _Account, String _Password) +164
   Manage_Login.btnLogin_Click(Object sender, EventArgs e) +270
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
翻译了一下就是:

试图加载格式不正确的程序(从HRESULT异常:0x8007000B)

描述:在当前Web请求的执行过程中发生未处理的异常。请检查堆栈跟踪有关该错误的详细信息以及它起源于代码。

异常详细信息:System.BadImageFormatException:试图加载格式不正确的程序(从HRESULT异常:0x8007000B)
源错误:
当前Web请求的执行过程中生成了未处理的异常。有关异常的来源和位置信息可以使用下面的异常堆栈跟踪信息确定。


堆栈跟踪:
[BadImageFormatException:试图加载格式不正确的程序(从HRESULT异常:0x8007000B)
   System.Data.Common.UnsafeNativeMethods.OCILobCopy2(IntPtr的svchp,IntPtr的errhp,IntPtr的dst_locp,IntPtr的src_locp,UINT64量,UINT64 DST_OFFSET,UINT64 src_offset)+ 0
   System.Data.OracleClient.OCI.DetermineClientVersion()+297
[InvalidOperationException异常:尝试加载Oracle客户端库扔BadImageFormatException。在64位模式下安装了32位的Oracle客户端组件运行时,会出现此问题。]
   ZFSoft.BusinessEntity.LoadFromSql(字符串SP,ListDictionary参数,命令类型的CommandType)1659
   ZFSoft.BusinessEntity.LoadFromSql(字符串SP,ListDictionary参数)+72
   ZFSoft.DAL._SYS_USER.LoadByPrimaryKey(字符串ACCOUNT)在E:.......\ ZFSoft.DAL \ SYS_USER.cs:105
   Manage_Login.UserLogin(字符串_Account,字符串_Password)+164
   Manage_Login.btnLogin_Click(对象发件人,EventArgs的)+270
   System.Web.UI.WebControls.Button.RaisePostBackEvent(字符串eventArgument)+154
   System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)3691


问题说明:

之前装了32位的Navicat,卸载了问题还是存在,但是另一台服务器上也装了32位的Navicat就没有问题,仔细对比下配置,发现标红部分不一样:

这里把应用程序池的启用32位应用程序的False改成True就行了,然后重新启动下IIS。



  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值