我有一台新机器,只有 Visual Studio 2015 和最新的 .Net Framework ,克隆了一个使用实体访问远程Oracle 11g数据库的存储库来自Nuget的和 Oracle.ManagedDataAccess ,这个项目可以在其他机器上运行,
我使用 SqlDeveloper 测试了远程连接,并使用telnet验证了端口访问,甚至创建了一个简单的本地Oracle数据库来排除任何与网络相关的错误
要确认错误,我在Oracle文章之后创建了一个简单的控制台项目,但仍然遇到了相同的错误
例外:The provider did not return a ProviderManifestToken string.
InnerException:ORA-01017: invalid username/password; logon denied
我没有安装任何Oracle客户端,据我所知,我不需要任何,因为我正在使用Nuget
是的,我非常确定用户和密码,如上所述,使用SqlDeveloper时连接正常工作
Oracle ManagedDataAccess Nuget
完整StackTrace
"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注册表设置,在这个问题中你可以找到在注册表或应用程序配置中禁用的方法,如果你需要