I’m using Oracle.ManagedDataAccess
to connect to a local Oracle SQL database.
With this source:
OracleConnectionStringBuilder connStr = new();
//fake password and username, but I double checked they're correct.
connStr.UserID = "admin"; //user was created with sqlplus from a command prompt
connStr.Password = "1234";
connStr.DataSource = "localhost:1521/xe";
_conn = new OracleConnection(connStr.ConnectionString);
_conn.Open(); // <- exception here after tens of seconds
I get a Oracle.ManagedDataAccess.Client.OracleException: 'ORA-50000: Connection request timed out'
exception in the Open
call.
I’ve also tried connecting to my university’s iSQLPlus database, but I get the same error.
On my local database, connecting using Oracle SQL Developer works with no issues.
I expected the connection to obviously succeed, but I get the timeout error.
2