Enterprise Library 6.0 defaulting to System.Data.OracleClient instead of oracle.manageddataaccess.client c#

We have a decade old web forms application which uses Enterprise Library 5.0.414.0 with Oracle.DataAccess.dll (4.112.) to connect to our Oracle DB, and this worked flawlessly until recently. With the removal of VC++ 2012 REDISTRIBUTABLE in our servers, we are now compelled to use the Enterprise Library 6.0 with oracle.manageddataaccess.dll (v19.1 upwards) as the earlier version had a strong reference to Oracle.DataAccess.dll (4.112.).

I have a test application using the Enterprise Library 6.0 with the Oracle.ManagedDataAccess.dll (19.1 version). This seems to be working fine. However, I had 2 issues observed:

  1. Using wallets did not work. However, the same works when i provide the user id and password
  2. when providing “Proxy User ID”, “Validate Connection” etc, error was thrown saying that the keyword was not supported.

On investigating further, I observed that internally, the provider being used is still “System.Data.OracleClient” and not “Oracle.ManagedDataAccess.Client” and hence the reason for the issues.

The following is my web.config entry

<configSections>
  <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/>
</configSections>
<dataConfiguration defaultDatabase="6083">
  <providerMappings>
    <add databaseType="Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase, Microsoft.Practices.EnterpriseLibrary.Data"
      name="Oracle.ManagedDataAccess.Client" />
  </providerMappings>
</dataConfiguration>
<connectionStrings>
  <clear />
<add providerName="Oracle.ManagedDataAccess.Client" name="conn1" connectionString="Data Source=DS_1;Password=PWD1;User ID=USER1;"/>
</connectionStrings>
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <publisherPolicy apply="no" />
      <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>
  <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.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>
  </system.data>
    <appSettings>
        <add key="useODPNET" value="Y" />
        <add key="wrappertype" value="1" />
    </appSettings>
 <oracle.manageddataaccess.client>
    <version number="*">
      <settings>
          <setting name="TNS_ADMIN" value="<PATH_TO_TNS>" />
      </settings>
    </version>
  </oracle.manageddataaccess.client>
</configuration>

This is the sample class that i am using

public class DataAccessWrapper : IDBWrapper
{

    static DataAccessWrapper()
    {
        DatabaseFactory.SetDatabaseProviderFactory(new DatabaseProviderFactory());
    }

    public List<errorinfo> GetErrors()
    {
        
        var database = DatabaseFactory.CreateDatabase();//THE DBFACTORY IS ALWAYS System.Data.OracleClient
        List<errorinfo> errors = new List<errorinfo>();

        using (var conn = database.CreateConnection())
        {
            conn.Open();
            using (DbCommand command = conn.CreateCommand())
            {
                command.CommandText = "SELECT * FROM SOME_TABLE WHERE DATETIME >= sysdate - 20 ORDER BY 1 DESC";
                command.CommandType = System.Data.CommandType.Text;
                var reader = command.ExecuteReader();
                while (reader.Read())
                {
                    var i = reader["ERRORLOG_ID"].ToString();
                    var j = reader["LOGGER"].ToString();
                    errors.Add(new errorinfo(i, j));
                    Console.WriteLine(i);
                    Console.WriteLine(j);
                }
            }
        }
        return errors;
    }
}

The same code (except for the addition of SetDatabaseProviderFactory in the constructor) when run using the previous EntLib 5.0.414 was returning Oracle.DataAccess.Client related objects. In this case, its always OracleClient, even though the connectionstring has been set accordingly. Am I missing something here? Please advise, guide.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật