I attempting to use Entity Framework to connect to an Oracle database using the managed client through LDAP. As this will reside on a server, I would like to keep the application independent of server ldap.ora or sqlnet.ora. (database already exists)
I was able to set everything up correctly for Oracle data adapters to use LDAP using only the app.config, but it does not work for Entity Framework. This is an important point as it would suggest that my ldap settings in the app.config are correct.
The exact message I'm getting is that the connection times out, but that isn't true because I can connect to the same database using LDAP but just with data adapters. I tested this by disabling LDAP in my TNS_ADMIN folder and then connecting successfully with LDAP in the application.
Pretty sure this part of the app.config is correct already:
<LDAPsettings>
<LDAPsetting name="DIRECTORY_SERVERS" value="(ldapserver1.fqdn.com,ldapserver2.fqdn.com)"/>
<LDAPsetting name="DIRECTORY_SERVER_TYPE" value="oid"/>
<LDAPsetting name="DEFAULT_ADMIN_CONTEXT" value="dc=fqdn,dc=com"/>
<LDAPsettings>
This is the connection string that works for the data adapter:
<add name="myapplication.My.MySettings.LDAPConnectionString"
connectionString="DATA SOURCE=theservicename;PASSWORD=password;USER ID=userid"
The question is how do I create the Entity Framework model and the connection when the connection manager cannot seem to use LDAP to connect to Oracle? How can the connection string for Entity Framework be generated if the connection manager doesn't understand LDAP?
If I attempt to create an Entity Framework model by Add new item ->Data->ADO.Net Entity Data Model-> Code First from database->selecting the connection string the data adapter used. This gives me the message that the connection request timed out. I am using Visual Studio 2017 Pro, 6.4.4 of Entity Framework, 19.7 of Oracle Managed Access and Oracle Managed Access Entity Framework.
A product manager from Oracle mentioned that it might not be supported by EF Factory, but he wasn't sure.
I have looked at other questions here regarding this, but none seem to address anything beyond how LDAP should be setup in the app.config. They do not address Entity Framework particularly. I would like to know how to setup the Entity Framework specific connection string and the model itself.