0

We are trying to connect oracle 19c AWS RDS via dotnet 4.8 console application using kerberos authentication . i am using [Oracle.ManagedDataAccess] driver (https://www.nuget.org/packages/Oracle.ManagedDataAccess/21.9.0). We have already included Oracle.ManagedDataAccessIOP.dll in project as motioned in library read me file and installed MIT Kerberos tool on system. but we are getting following issue

Kerberos5: Authentication handshake failure at stage: Could not load file or assembly 'Oracle.ManagedDataAccessIOP, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. TThe specified module could not be found.
   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 TestDBConnections.Program.CheckConnection(String dbType, String connString) 

we have included following settings in app.config as well

<configSections>
    <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  </configSections>

 <system.data>
    <DbProviderFactories>
      <remove invariant="Oracle.ManagedDataAccess.Client" />
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>
  </system.data>

<oracle.manageddataaccess.client>
        <version number="*">

            <settings>
                <setting name="sqlnet.authentication_services" value="kerberos5"/>
                <setting name="sqlnet.authentication_kerberos5_service" value="oracle"/>
                <setting name="sqlnet.kerberos5_conf" value="C:\windows\krb5.ini"/>
                <setting name="sqlnet.kerberos5_conf_mit" value="TRUE"/>
                <setting name="sqlnet.kerberos5_cc_name" value="MSLSA"/>
            </settings>
        </version>
    </oracle.manageddataaccess.client>

and following is the connection string we are using

"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={RDS host name})(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SID={sid}))); User Id=/;Password="

i am not sure why application is not able to load Oracle.ManagedDataAccessIOP.dll.

i already tried including the "Oracle.ManagedDataAccessIOP.dll" in x64 and x86 folder with application

Vinay Jha
  • 1
  • 1

0 Answers0