1

我有一台新机器,只有Visual Studio 2015和最新的.Net Framework ,克隆了一个存储库,该存储库使用 Nuget 的EntityOracle.ManagedDataAccess访问远程 Oracle 11g 数据库 ,这个项目在其他机器上工作,

我使用SqlDeveloper测试了远程连接,并使用 telnet 验证了端口访问,甚至创建了一个简单的本地 Oracle 数据库以排除任何与网络相关的错误

为了确认错误,我在 Oracle 文章之后创建了一个简单的控制台项目,但仍然出现相同的错误

例外 :The provider did not return a ProviderManifestToken string.

内部异常: ORA-01017: invalid username/password; logon denied

我没有安装任何 Oracle 客户端,据我所知,我不需要任何客户端,因为我使用的是 Nuget

是的,我非常确定用户和密码,如上所述,使用 SqlDeveloper 时连接有效

Oracle ManagedDataAccess Nuget

甲骨文文章

全栈跟踪

"data source=OracleDS;user id=PUBLICO;password=PUBLICO;min pool size=1;max pool size=1;Incr Pool Size=1 ----- System.Data.Entity.Core.ProviderIncompatibleException: An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure. ---> System.Data.Entity.Core.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> Oracle.ManagedDataAccess.Client.OracleException: ORA-01017: invalid username/password; logon denied
   em OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch)
   em OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch)
   em OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx)
   em Oracle.ManagedDataAccess.Client.OracleConnection.Open()
   em Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.GetDbProviderManifestToken(DbConnection connection)
   em System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
   --- Fim do rastreamento de pilha de exceções internas ---
   em System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
   em System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
   --- Fim do rastreamento de pilha de exceções internas ---
   em System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
   em System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   em System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest)
   em System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
   em System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
   em System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
   em System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
   em System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
   em System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
   em System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
   em System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
   em System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   em BemaHybrid.Library.EntityFramework.DbContextExtended.AdquireUsuarioSenhaBaseadoUsuarioPublico() na D:\\Projetos\\hybrid.cliente\\BemaHybrid.Library.EntityFramework\\DbContextExtended.cs:linha 42"

更新

找到了这个问题的答案,一个加密密码的 Windows 注册表设置,在这个问题中,如果需要,您可以在注册表或应用程序配置中找到禁用的方法

解决方案

4

0 回答 0