我正在使用 - ASP.NET,C#,. NET 4.5.2 - Oracle.ManagedDataAccess - Oracle.ManagedDataAccess.EntityFramework - Oracle.DataAccess - 运行Windows Server 2008 SP2的服务器。
我的网站在大多数部分使用Oracle.DataAccess(例如登录,搜索数据)。我正在将一些部分迁移到Oracle.ManagedDataAccess(例如,插入Permit数据)。该网站在我的计算机和服务器上都能很好地工作。但是,当它工作大约3-4天时,它将显示来自Oracle.ManagedDataAccess部件的ORA-12154错误,但Oracle.DataAccess部件仍能正常工作。我可以登录或搜索数据,但我无法插入允许数据。
我目前的解决方案是每3-4天回收一次应用程序池,它将再次运行。请建议我。谢谢。
这是一些例外。
System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> Oracle.ManagedDataAccess.Client.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified ---> OracleInternal.Network.NetworkException: ORA-12154: TNS:could not resolve the connect identifier specified
at OracleInternal.Network.AddressResolution..ctor(String TNSAlias, String instanceName)
at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor)
at OracleInternal.Network.OracleCommunication.Connect(String tnsDescriptor, Boolean doNAHandshake, String IName)
at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, CriteriaCtx criteriaCtx, String instanceName)
--- End of inner exception stack trace ---
at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx)
at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)