oracle ODP.NET 集成安全连接字符串参数无效

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4950897/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 22:42:25  来源:igfitidea点击:

ODP.NET Integrated Security Invalid Connection String Argument

.netoracleconnection-stringodp.netintegrated-security

提问by Travis Heseman

What am I missing?

我错过了什么?

<add name="test" 
    connectionString="Data Source=TEST_ORACLE;Integrated Security=Yes;" />

[ArgumentException: 'Integrated Security' is an invalid connection string attribute]
   Oracle.DataAccess.Client.OracleConnection.ParseConnectionString() +2707
   Oracle.DataAccess.Client.OracleConnection.set_ConnectionString(String value) +533
   Oracle.DataAccess.Client.OracleConnection..ctor(String connectionString) +210

ODP.NET: Oracle.DataAccess - 2.102.2.20 (I am using a bindingRedirect to this version.)

ODP.NET:Oracle.DataAccess - 2.102.2.20(我使用 bindingRedirect 到这个版本。)

If I take out Integrated Security and declare User ID and password then it functions correctly. So, I know there is nothing wrong with ODP.NET.

如果我取出 Integrated Security 并声明用户 ID 和密码,则它可以正常运行。所以,我知道 ODP.NET 没有任何问题。

回答by Harrison

I don't think that ODP has the Integrated Security Attribute: http://download.oracle.com/docs/html/E10927_01/featConnecting.htm#i1006259

我不认为 ODP 具有集成安全属性:http: //download.oracle.com/docs/html/E10927_01/featConnecting.htm#i1006259

but this site (http://www.oracle.com/technetwork/topics/dotnet/code-154692.html) states

但是这个站点 (http://www.oracle.com/technetwork/topics/dotnet/code-154692.html) 声明

To migrate to ODP.NET, remove these attributes if they are part of the Microsoft OracleClient connection string.

* Integrated Security -- Set " User Id=/" in the ODP.NET connection

string for the equivalent operating system authentication.

要迁移到 ODP.NET,请删除这些属性(如果它们是 Microsoft OracleClient 连接字符串的一部分)。

* Integrated Security -- Set " User Id=/" in the ODP.NET connection

用于等效操作系统身份验证的字符串。

which is the same that these guys go through: http://forums.oracle.com/forums/thread.jspa?threadID=583813&tstart=405

这与这些人经历的相同:http: //forums.oracle.com/forums/thread.jspa?threadID=583813&tstart=405

So use User Id=/and see if that works

所以使用User Id=/看看是否有效

also make sure to have your sqlnet.ora have "SQLNET.AUTHENTICATION_SERVICES = (NTS)"

还要确保你的 sqlnet.ora 有“SQLNET.AUTHENTICATION_SERVICES = (NTS)”