I'm trying to switch my .NET project over to the manage oracle to make deployments easier. However I'm getting the following error in my test Win Server 2013 environment:
Unable to determine the provider name for connection of type 'Oracle.ManagedDataAccess.Client.OracleConnection'.
Steps I've taken so far:
- Removed all Oracle.DataAccess dll's and references from the solution
- Added the Oracle Data Provider for .NET (ODP.NET) Managed Driver in the NuGet package manager
- Switched all
Imports Oracle.DataAccess
statements over toImports Oracle.ManagedDataAccess
I'm not getting any build errors, and the project runs fine locally. However when deployed to the testing environment, I get this error. The test environment is Windows Server 2012, and has a legacy Oracle 11.2.0 client tools installation present.
This is my connection creation code:
Public Sub New()
MyBase.New(
New OracleConnection(
ConfigurationManager.ConnectionStrings("Entities").ConnectionString),
True)
End Sub
Here are 3 different styles of connection configs that I have tried (both work locally, but yield the same problem on the test environment)
(formatted for visibility)
<add
name="Entities"
connectionString="
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=###.###.###.###)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=______)));
User Id=_____;
Password=_____;"
providerName="Oracle.ManagedDataAccess.Client" />
<add
name="Entities"
connectionString="
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=###.###.###.###)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=______)));
User Id=_____;
Password=_____;"
providerName="Oracle.DataAccess.Client" />
<add
name="Entities"
connectionString="
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=###.###.###.###)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=______)));
User Id=_____;
Password=_____;"
/>
Any help would be greatly appreciated!