iis .net 连接oracle报错"running in 64 bit mode with the 32 bit Oracle client"

[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.]
   System.Data.OracleClient.OCI.DetermineClientVersion() +615
   System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +38
   System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +136

解决方式:
1、iis程序池开启兼容32位
iis .net 连接oracle报错
2、环境变量path用32位oracle客户端路径

3、重启windows

你可能感兴趣的:(案例)