Oracle Kerberos support for .Net 5.0

0

I am trying to check if I am connect to Oracle using .Net 5.0 and Kerberos based on the closed github issue here.

I am using Oracle.ManagedDataAccess.Core, Version 3.21.1 library to connect to the oracle database using Kerberos but I am getting a Could not load file or assembly 'Oracle ManagedDataAccessIOP, Version=3.1.21.1 error.

What could I missing? The connection succeeds, if I do not connect to the database using Kerberos(i.e I comment out all the lines in the sqlnet.ora file)

static void Main(string[] args)
{
OracleConnection oracleConnection =
new OracleConnection("User Id=<DatabaseName>; Password=<Password>; Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = <Host>) (PORT =6136)) (LOAD_BALANCE=yes) (CONNECT_DATA=(SERVER = DEDICATED) (SERVICE_NAME=<ServiceName>)))");
oracleConnection.Open();    
}

sqlnet.ora

sqlnet.authentication services=(Kerberos5)
sqlnet.kerberos5_conf=I:\.NET Core 5 Kerberos Example\krb5\krb5.conf
sqlnet.kerberos5_cc_name=I:\.NET Core 5 Kerberos Example\krb5\krb5cc_cce_app_kd

StackTrace:

Oracle ManagedDataAccess.Client.OracleException (0x80004005): NA Kerberos5: Authentication handshake failure at stage: Could not load file or assembly 'Oracle ManagedDataAccessIOP, Version=3.1.21.1, Culture=neutral, PublicKeyTok
en=89b483f429c47342'. The system cannot find the file specified.
---> OracleInternal. Network.NetworkException (0x80004005): NA Kerberos5: Authentication handshake failure at stage: Could not load file or assembly 'Oracle. ManagedDataAccessIOP, Version=3.1.21.1, Culture=neutral, PublicKeyToken
=89b483f429c47342'. The system cannot find the file specified.
at OracleInternal.Network.Oraclecommunication.Doconnect(String tnsDescriptor)
at OracleInternal.Network.Oraclecommunication.Connect(String tnsDescriptor, Boolean doNAHandshake, String IName, ConnectionOption Co)
at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bopenEndUserSession, OracleConnection connRefForCriteria, String instanceName)
at OracleInternal.ConnectionPool.PoolManager 3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, OracleConnection connRefForcriteria, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.oraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OracleConnectionDispenser 3.Get(ConnectionString cs, PM conPM, ConnectionString pmcs, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria)
at Oracle ManagedDataAccess.Client.OracleConnection.Open()
at ConsoleApp. Program.Main(String[] args) in I:\.NET Core 5 Kerberos Example Program.cs:line 14
c#
.net
oracle
.net-5
asked on Stack Overflow Apr 6, 2021 by Ajit Goel

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0