Question I need help related to secure connection string TCPS

Lolita

Member
Joined
May 21, 2022
Messages
7
Programming Experience
1-3
Hello,
I am trying to connect to Oracle Database with PROTOCOL=TCPS from my Web Form application. This is my connection string that it is working perfectly for the PROTOCOL=TCP:
<add name="MyConnection" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myHostName)(PORT=xxxx))(CONNECT_DATA=(SERVICE_NAME=ABCDE))); User Id=xxxxxx; Password=xxxxxx; Persist Security Info=True; Connection Lifetime=10" providerName="System.Data.OracleClient"/>

I hade the same issue using SQL Developer, but after adding the CA certs file (cacerts) under the folder sqldeveloper\jdk\jre\lib\security I was able to connect to the database from SQL Developer

So, please let me know how I can modify my connection string to be able to connect to the same database:
I did some search and I did add (SECURITY=(DIRECTORY=C:\sqldeveloper\jdk\jre\lib\security\cacerts)) but it is not working
This is the Error that I get:
Error!
Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Network Transport: SSL failure in parsing wallet location ---> OracleInternal.Network.NetworkException (0xFFFFE700): Network Transport: SSL failure in parsing wallet location at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor) at OracleInternal.Network.OracleCommunication.Connect(String tnsDescriptor, Boolean externalAuth) at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession) at Oracle.ManagedDataAccess.Client.OracleException.HandleError(OracleTraceLevel level, OracleTraceTag tag, Exception ex) at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession) at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd) at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd) at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword) at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword) at Oracle.ManagedDataAccess.

Thank you for you help
 
Last edited:
Looks more like an Oracle SQL driver question rather than a C# question.

Anyway, this is confusing:
This is my connection string that it is working perfectly for the PROTOCOL=TCP:
<add name="MyConnection" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=myHostName)(PORT=xxxx))(CONNECT_DATA=(SERVICE_NAME=ABCDE))); User Id=xxxxxx; Password=xxxxxx; Persist Security Info=True; Connection Lifetime=10" providerName="System.Data.OracleClient"/>
You say that it is working perfectly. You show there that you are already using TCPS. Later in your question above though, you say that cannot connect using TCPS.
 
As a quick aside, in general, Microsft Windows keeps its certificates in the certificate store, not in wallet files like Java. Yes, the certificate store ultimately is based on files, but access to the store is generally through Windows APIs. Perhaps that Oracle driver running on Windows needs the needed certificates in the Windows certificate store.
 
Hello Skydiver,
Thank you for your answer
I just update the connection string that it is work fine with PROTOCOL=TCP as you can see in the main question
The issue is with the PROTOCOL=TCPS
Thanks again
 
You will likely get more help by asking in Oracle database forums rather than a C# forum.
 
Hello Skydiver,
Finaly it was related to Oracle.ManagedDataAccess version and not to the Certificat file, so this is what I did:
1. Import my solution from Visual Studio 2013 into Visual Studio 2019
2. In Visual Studio 2019, I changed the Target Framwork to (.NET Framework 4.8)
3. Update Oracle.ManagedDataAccess to the ( version 21.8.0)
It is working fine now
Thank you for your time and your help
Have a great day
 
Back
Top Bottom