For some reason I have to include an LDAP.ORA file inside my .NET project when attempting to connect to Oracle with LDAP. From my understanding of using the Oracle.ManagagedDataAccess nuget package I should be able to contain everything within the web.config. Documentation from Oracle is located here and a useful walk through is provided here. I am guessing that one of my configuration properties is slightly off, but I haven't been able to track it down. Any help would be much appreciated!
Oracle Configuration Section
<oracle.manageddataaccess.client>
<version number="*">
<LDAPsettings>
<LDAPsetting name="DIRECTORY_TYPE" value="OID" />
<LDAPsetting name="DEFAULT_ADMIN_CONTENT" value="dc=mycompany,dc=net"/>
<LDAPsetting name="DIRECTORY_SERVERS" value="(myoid.mycompany.net:1389:1636)" />
</LDAPsettings>
<settings>
<setting name="NAMES.DIRECTORY_PATH" value="(LDAP)"/>
<setting name="NAMES.DEFAULT_DOMAIN" value="mycompany"/>
</settings>
</version>
</oracle.manageddataaccess.client>
Oracle Connection String
<add name="MyDatabase" providerName="Oracle.ManagedDataAccess.Client" connectionString="Data Source=MyDatabase; User Id=MyUser; Password=MyPassword;" />
Connection Code
private DbConnection GetConnection()
{
var connectionStringSettings = ConfigurationManager.ConnectionStrings["MyDatabase"];
var connection = new OracleConnection(connectionStringSettings.ConnectionString);
connection.Open();
return connection;
}