Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
.NET Core: Cannot connect using Oracle Wallet

Hi!
I am trying to connect to the database using Oracle Wallet and Oracle.ManagedDataAccess.Core v3.21.1
In my SQLNET.ora I have:
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = C:\Temp\wallet\wallet_test)
))
SQLNET.WALLET_OVERRIDE = TRUE
From the command line I can run this and successfully connect.
sqlplus /@database.alias
In a simple .NET Console application I have:
OracleConfiguration.WalletLocation = @"(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=c:\temp\wallet\wallet_test)))";
OracleConfiguration.SqlNetWalletOverride = true;
OracleConfiguration.TnsAdmin = @"C:\Temp\wallet";
OracleConfiguration.TraceLevel = 7;
OracleConfiguration.TraceFileLocation = @"C:\temp\wallet";
OracleConfiguration.TraceOption = 7;
using var connection = new OracleConnection("User ID=/; Data Source=database.alias");
connection.Open();
And I receive Oracle.ManagedDataAccess.Client.OracleException: 'ORA-01017: invalid username/password; logon denied'
In my trace file I have:
2021-03-30 14:55:56.109247 TID:1 (PRI) (CP) OraclePoolManager.FetchSEPSCredentails() FetchSEPSCredentails => Querying Data Source (TRIAL: 0): database.alias
2021-03-30 14:55:56.125621 TID:1 (NET) (SQLNET) Wallet Location = c:\temp\wallet
2021-03-30 14:55:56.212667 TID:1 (NET) (SQLNET) SEPS userid is null.
2021-03-30 14:55:56.212819 TID:1 (NET) (SQLNET) SEPS password is null.
2021-03-30 14:55:56.212840 TID:1 (PRI) (CP) OraclePoolManager.FetchSEPSCredentails() FetchSEPSCredentails => Got Credentials from Client Wallet
Am I missing something blindly obvious?
Thanks,
James
Answers
-
Hi James,
<incorrect information about sqlnet.ora wallet path deleted>
(Also, only Windows is currently supported)
Thanks,
Christian
-
Hi Christian,
Sorry, I (originally) mis-posted above... the two paths are identical (now corrected).
Also, this is running on Windows.
I am struggling to find documentation on this... can you point me in the right direction?
Are there plans to support Linux too?
Thanks,
James
-
Here's the doc for setting up ODP.NET SEPS.
When you say the paths are identical, do you mean that both SQL*Plus and ODP.NET are using c:\temp\wallet?
-
Hi Alex!
Yes - both sets of config are pointing to the same path.
I just badly redacted one of the paths!
Thanks,
James
-
Hi James,
Does your wallet happen to be larger than 64K? We have noticed a problem with wallets larger than that.
-
FYI - I deleted some incorrect information I posted earlier about sqlnet.ora wallet path. (It CAN be overridden by OracleConfiguration.WalletLocation ).
Sorry about that.
-
Hi Alex, the wallet is 49KB.
-
Hi Alex / Christian,
I have done a whole lot more digging, and can confirm the following:
- The wallet I was originally given came from our DBAs with 123 entries and is 49KB
- If I create a new wallet with just the same credentials that I require, it connects correctly.
- If I delete the credential and recreate it, I can connect
- If I create a new wallet with 128 dummy entries followed by the entry I require, it still connects correctly (and is 51KB in size)
- If I write a for loop and iterate over the 123 entries in the failing wallet, some connect, others don't
- The wallet that we will be using when we go live will be ~790KB
- If I use this wallet, then none of those connections succeeds
- I have then created a brand new wallet with the first failing entry (and that alone)
- This is for a test database, uses an obsolete schema with an expired password
- This works in SQL*Plus: ORA-28001: the password has expired
- But fails in C#: ORA-01017: invalid username/password; logon denied
Assuming that you have access to my email address, if you reach out directly, I can share further details with you directly.
Thanks,
James
-
Also, only Windows is currently supported
Are there plans to support Linux?
If so, is there a timeline?
-
Hi James,
Yes, we plan to support ODP.NET Core SEPS with Linux and to also fix the 64 KB bug along with it, The timing is TBD.
Your findings suggest there may be some particular part of the original wallet file that ODP.NET Core is not handling properly. Is it possible to share your full ODP.NET trace and your wallet file? I realize the latter is a more difficult request, but perhaps you have a test wallet that reproduces the error.
I have communicated with a couple of James Driscolls over the years. To avoid reaching out to the wrong one, you can send me an email at alex.keh(at)oracle.com.