Most likely the ODP.NET Managed Driver does not find your sqlnet.ora
and ldap.ora
files.
Did you set NAMES.DIRECTORY_PATH = (LDAP, ...)
in your sqlnet.ora
file?
You can define location of sqlnet.ora
and ldap.ora
files also by TNS_ADMIN
environment variable or in machine.config with a script similar to this:
set TNS_ADMIN=C:\oracle\network\admin
set Oracle_x64=c:\oracle\product\12.2\Client_x64\odp.net
"%Oracle_x64%\managed\x64\OraProvCfg.exe" /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:%Oracle_x64%\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:%TNS_ADMIN%
set Oracle_x86=c:\oracle\product\12.2\Client_x86\odp.net
"%Oracle_x86%\managed\x86\OraProvCfg.exe" /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:%Oracle_x86%\managed\common\Oracle.ManagedDataAccess.dll /set:settings\TNS_ADMIN:%TNS_ADMIN%
If it does not help, here would be a workaround: ODP.NET Managed library does resolve alias, but 32-bit library does. However, on my machine LDAP resolution works fine with ODP.NET Managed Driver. Perhaps have also a look at Oracle Data Provider for .NET, Managed Driver Configuration