I am trying to access an Oracle database (version 10.2.0.4.0) using the following code, but the exception "ORA-01005: Null password given; logon denied" is raised, caused by the connection when the open method is called.
var connBuilder = new OracleConnectionStringBuilder(); connBuilder.DataSource = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = MyHost.Address)(PORT = ####)) )(CONNECT_DATA =(SERVICE_NAME = MyService)))"; connBuilder.UserID = "validUserId"; connBuilder.Password = "validPassword"; connBuilder.PersistSecurityInfo = true; var connString = connBuilder.ToString(); using (var con = new OracleConnection(connString)) { con.Open(); }
If I change the username, instead I get the following: "ORA-01017: invalid username / password, registration denial", and this also happens if I change the open call to the connection with con.OpenWithNewPassword("validPassword");
If I try to use an outdated Oracle client, it will cope without problems:
using (var depCon = new System.Data.OracleClient.OracleConnection ("Data Source=MyHost.Address:####/MyService;Persist Security Info=True; User ID=validUsername;Password=validPassword;Unicode=True")) { depCon.Open(); }
I would (obviously) like to use the latest Odp.Net drivers, but it seems like it can't get past this problem. Does anyone have any idea?
KevD Aug 03 '15 at 11:06 2015-08-03 11:06
source share