Oracle客户端和IIS问题
继续讨论从 .NET 连接到 Oracle DB 所需的最小占用空间。我已经成功地将所有内容设置为无需安装即可工作(只需复制所需的文件)。但是,当我尝试将代码作为 IIS (7.5) 应用程序运行时,出现以下错误:
[Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.]
System.Data.OracleClient.OCI.DetermineClientVersion() +264875
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
...
根据我的阅读,这可能是权限问题,但我尝试了很多方法(设置文件的访问权限、更改应用程序池用户,使用 ProcMon 进行监控等)以使其正常工作,但无济于事。有人对如何解决这个问题有任何想法,还是我应该放弃并安装即时客户端?
我知道 devart 的 Oracle 客户端,但不幸的是,这不是一个选择。
Continuing the discussion about the minimum footprint needed to connect to an Oracle DB from .NET. I've managed to set everything up to work without the installation (just by copying the required files). But when I try to run the code as IIS (7.5) application, I get the following error:
[Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.]
System.Data.OracleClient.OCI.DetermineClientVersion() +264875
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
...
From what I've read, this could be a permissions problem, but I've tried many things (setting access premissions to files, changing the app. pool user, monitoring with ProcMon etc.) to get this to work, but to no avail. Does anybody have any ideas on how to approach this or should I just give up and install the instant client?
I know about devart's Oracle client, but it's not an option, unfortunately.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,解决方案是在(重新)将 PATH 环境变量设置为 Oracle 客户端文件(原帖子中描述的 4 个 DLL)的位置后重新启动计算机。重新启动 IIS 没有帮助,我不得不重新启动整个机器。
OK, the solution was to restart the computer after (re)setting the PATH environment variable to the location of Oracle client files (the 4 DLLs described in the original post). Restarting IIS did not help, I had to restart the whole machine.