ODP.NET Integrated Security Invalid Connection String Argument

若如初见. 提交于 2019-12-10 17:57:34

问题


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.)

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.


回答1:


I don't think that ODP has the Integrated Security Attribute: 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

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.

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

So use User Id=/ and see if that works

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



来源:https://stackoverflow.com/questions/4950897/odp-net-integrated-security-invalid-connection-string-argument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!