Hello my friends:
I have an IIS Instance which runs on a dedicated Windows Server 2012 R2. I also have Oracle 11G running on another dedicated Windows Server 2012 R2 instance.
From my development computer, I am able to connect to the Oracle DB without errors. Everything works, Entity Framework, SQL Developer and Link Servers.
The problem is, when I deploy the application to IIS, the connection does not work, I get the error: The underlying provider failed on Open.
Note: The application uses Entity Framework.
Things I have tried:
- Installed Oracle Instant Client on the Windows Server running IIS
- Create TNS_ADMIN variable in Environment Variable
- Set Path to Oracle Instant Client
- Add ODBC drivers to the instant client folder
- Create and configured tnsnames.ora
From the Server running IIS, I am able to ping the Windows Server running Oracle DB.
Here is the connection string in IIS under the deployed application:
metadata=res://*/OracleDB.csdl|res://*/OracleDB.ssdl|res://*/OracleDB.msl;provider=Oracle.ManagedDataAccess.Client;
provider connection string="DATA SOURCE=INSTANCE_TNSNAMES;PASSWORD=MyPassword;
PERSIST SECURITY INFO=True;USER ID=MyUserID"
How can I get the application deployed to IIS to connect to the Oracle Database?
Thank you my Friends: