Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem connecting to Oracle server using SSL and ODP.NET

user-m7vx9May 12 2023 — edited May 12 2023

I can't connect to Oracle using SSL from ODP.Net.

I verified all configurations, I remake the wallets and certificates, exchanged certificates… but nothing works.

From SQLPlus the SSL connections are opening correctly, same using Toad, but impossible from .Net which I'm getting this inner exception:

Win32Exception: The message received was unexpected or badly formatted

The application uses .net Framework 4.7.2. In our development environment the SSL connection doesn't work. The same application in our production environment is working properly. So for me is a configuration problem in my development machine related with .net and C#, but I'm not able to find the cause. We made some days ago a clean installation of the Oracle Client 19c (19.3.0) and I'm not sure if there are other configuration files that could be modified (regarding my old installation).

I'm using this light test code:

OracleConnection conn = new OracleConnection("User Id=myuser;Password=mypassword;Data Source=dsssl")
conn.TnsAdmin = @"C:\app\oracle\product\19.3.0\client_64\network\admin";
conn.Open();

I tried also to set the ‘WalletLocation’ but it doesn't change anything. It finds correctly the wallet using the tsnames.ora and sqlnet.ora files.

Any suggestion ?

Comments
Post Details
Added on May 12 2023
1 comment
591 views