ODP.NET Integrated Security Invalid Connection String Argument
Asked Answered
F

1

6

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.

Fraction answered 9/2, 2011 at 21:46 Comment(4)
Not sure if it matters on Oracle, but connectionstrings.com/oracle#p12 states it should be Data Source=TEST_ORACLE;Integrated Security=SSPI;.Spurt
Made that change... same error.Fraction
It should work, but I don't have an Oracle around to test on ... Which ODP version is this ?Spurt
I added the Oracle.DataAccess version at the bottom.Fraction
P
8

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

Parthenopaeus answered 9/2, 2011 at 22:3 Comment(1)
I struggled with this before realising that sqlnet.ora isn't automatically discovered by ODP. Rather than making it available to the code, you can add OracleConfiguration.SqlNetAuthenticationServices = "nts";Psychophysics

© 2022 - 2024 — McMap. All rights reserved.