浏览 2091 次
锁定老帖子 主题:.net运行时报此错,如何解决
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2012-12-14
-------------------------------------------------------------------------------- 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B) 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B) 源错误: 行 287: { 行 288: List<T> list = new List<T>(); 行 289: DataTable table = entity.Fill(where); 行 290: foreach (DataRow row in table.Rows) 行 291: { 源文件: F:\net\DQ\Bll\ExtClass.cs 行: 289 堆栈跟踪: [BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 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() +178 [InvalidOperationException: 尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题。] System.Data.OracleClient.OCI.DetermineClientVersion() +459 System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +63 System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +133 System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +40 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +29 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +72 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +457 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +100 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +116 System.Data.OracleClient.OracleConnection.Open() +40 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +115 Winston.Data.Common.DataAccess.Fill(DataTable dt, String sql) +133 Winston.Data.Common.DataAccess.Fill(String sql) +101 Winston.Data.Common.Entity.Fill(Nullable`1 top, String paramfields, Where where, String order) +514 Winston.Data.Common.Entity.Fill(String paramfields, Where where, String order) +98 Winston.Data.Common.Entity.Fill(String paramfields, Where where) +71 Winston.Data.Common.Entity.Fill(Where where) +72 ExtClass.FillList(T entity, Where where) in F:\net\DQ\Bll\ExtClass.cs:289 Bll.DataIndex.DataIndex.UploadAllIndex() in F:\net\DQ\Bll\DataIndex\DataIndex.cs:638 Web.Global.Application_Start(Object sender, EventArgs e) in F:\net\DQ\Web\Global.asax.cs:21 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2012-12-14
我的是win7 64位,oracle11g 64位 ,vs2008
|
|
返回顶楼 | |
发表时间:2013-05-30
都提示得已经很清楚了,你的foreach 遍历里面有问题
|
|
返回顶楼 | |