当我尝试打开与db的连接时,我收到此异常。它适用于Oracle db。我相信我的连接字符串是正确的,因为我使用这些凭据连接到Oracle SQL Developer没有问题。我的代码如下:
连接字符串:
<add name="DART_APPLICATION_CONNECTION" connectionString="Data
Source=tdmmetad.world;User ID=*****;Password=*******;Pooling=true;Min Pool
Size=1;Max Pool Size=20;Connection Lifetime=120;"
providerName="Oracle.DataAccess.Client"/>
然后我尝试打开连接:
Dim oracleConn As New
Oracle.DataAccess.Client.OracleConnection(connectionString)
conn = oracleConn
conn.Open()
这是我的异常和堆栈跟踪:
无法加载数据库配置值: System.ApplicationException:无法打开应用程序连接: Oracle.DataAccess.Client.OracleException at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(的Int32 errCode,OracleConnection conn,IntPtr opsErrCtx,OpoSqlValCtx * pOpoSqlValCtx,Object src,String procedure,Boolean bCheck)&#34; &安培; vbCrLf &安培; &#34;在Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode,OracleConnection conn,IntPtr opsErrCtx,Object src)&#34; &安培; vbCrLf&amp; &#34;在Oracle.DataAccess.Client.OracleConnection.Open()&#34; &安培; vbCrLf&amp; &#34;在Nexen.Dart.Core.DBCommon.GetOpenDbConnection(String connectionString,DataProviderType provider)in C:\ Users \ kak98262 \ Source \ Workspaces \ Technical Data Management \ Dart \ Main- branch3 \ Dart.Core \ DBCommon.vb:第451行&#34; &安培; vbCrLf&amp; &#34;在 Nexen.Dart.Core.DBCommon.GetApplicationConnection(AppConfig appConfig) 在C:\ Users \ kak98262 \ Source \ Workspaces \ Technical Data中 Management \ Dart \ Main-branch3 \ Dart.Core \ DBCommon.vb:第32行&#34; &安培; vbCrLf&amp; &#34;在Nexen.Dart.Core.DBCommon.GetApplicationConnection(AppConfig appConfig)在C:\ Users \ kak98262 \ Source \ Workspaces \ Technical Data中 Management \ Dart \ Main-branch3 \ Dart.Core \ DBCommon.vb:第35行&#34; &安培; vbCrLf&amp; &#34;在Nexen.Dart.Core.AppConfig.LoadDbConfigValues()中 C:\ Users \ kak98262 \ Source \ Workspaces \ Technical Data Management \ Dart \ Main- branch3 \ Dart.Core \ AppConfig.vb:第203行
任何想法?