System.ArgumentNullException: Value cannot be null
Parameter name : Key
Error occurs in conn.open()
The application is not able to connect to the database.
but connection string is provided in webconfig file.
The authentication is through sqlserver
and the database tables of the rest of the application is Oracle.
Provider : Oracle.ManagedDataAccess.Client
Value cannot be null.
Parameter name: key
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: key
Source Error:
Line 179: OracleDataAdapter da = new OracleDataAdapter(cmd);
Line 180: DataSet ds = new DataSet();
Line 181: conn.Open();
Line 182: da.Fill(ds);
Line 183:
stack trace:
[ArgumentNullException: Value cannot be null.
Parameter name: key]
System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +12994473
OracleInternal.Common.SyncDictionary`2.ContainsKey(K k) +79
OracleInternal.ConnectionPool.PoolManager`3.CreateServiceCtx(PR pr) +58
OracleInternal.ConnectionPool.PoolManager`3.PutNewPR(PR pr, Boolean bForPoolPopulation) +288
OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, CriteriaCtx criteriaCtx, String instanceName, List`1 switchFailedInstNames) +3667
OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch) +8424
OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch) +951
OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx) +1024
Oracle.ManagedDataAccess.Client.OracleConnection.Open() +3287
********.DAL.GetRequestorID(String currentUserEmail) in C:\Users\*****\Documents\Visual Studio 2015\Projects\Main\******\******\DAL.cs:181
*******._Default.Page_Load(Object sender, EventArgs e) in C:\Users\*****\Documents\Visual Studio 2015\Projects\Main\******\********\Default.aspx.cs:21
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
System.Web.UI.Control.OnLoad(EventArgs e) +95
System.Web.UI.Control.LoadRecursive() +59
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +780
What I have tried:
Changing the oracle provider to ODAC Provider.