I'm using llblgen version 126.96.36.199 (runtime library version) using "adapter" and using Oracle as my database. I'm also running under .NET Framework 4.7.
We seem to be seeing a behavior (on a customer's server...to which I don't have access) where Oracle.ManagedDataAccess.Client is specified in the connection string in web.config of my asp.net application appears like it might be falling back to using the unmanaged Oracle client.
We have: <add key="ODPNETAlwaysChooseUnmanagedProvider" value="false" /> set in the web.config.
The connection string is:
<add name="MyConnection" connectionString="Data Source=MYSID;User Id=MyUser;Password=temp;" providerName="Oracle.ManagedDataAccess.Client" />
Is there some fallback "magic" that will use the unmanaged oracle dataaccess, if the managed dataaccess is not installed or otherwise not available on the server?
(I'm trying to diagnose why the managed driver does not seem to be being used. I suspect it might not be installed on his server)
It's using a simple algorithm: it first tries to obtain the factory for the managed provider (see the machine.config file for the 64 bit .net installation on the machine (I assume you're not running a 32bit app ) which is located in \windows\microsoft.net\framework64\config
This uses the invariant name "Oracle.ManagedDataAccess.Client"
If it's not found, it assumes the unmanaged client is to be used, and it'll try to obtain the factory for that, using "Oracle.DataAccess.Client"
If that's also not present, it will stop (as it can't produce commands/connections etc.) and will report an error that it can't load the factory.
It might be you have an old ODP.NET installed, as recent ODP.NET installations install the managed client as well. It might also be (but I haven't checked) they don't ship the managed client anymore with odp.net but instead solely through nuget.
Indeed, same thing, but now you have to check the 32bit config file in that folder indeed. Our code uses DbProviderFactories.GetFactory() so we're not directly checking these files, that .NET class does. It depends on whether your app is 32 or 64 bit which config file DbProviderFactories is checking.