1

I got a fresh machine, with just Visual Studio 2015 and the latest .Net Framework, cloned a repository that accesses a remote Oracle 11g Database using Entity and Oracle.ManagedDataAccess from Nuget, this project does work in other machines,

I tested the remote connection using SqlDeveloper, and verified the port access with telnet and even created a simple and local Oracle Database to exclude any network related error

To confirm the error i created a simple Console Project following a Oracle Article and still got the same error

Exception : The provider did not return a ProviderManifestToken string.

InnerException : ORA-01017: invalid username/password; logon denied

I do not have any Oracle Client installed, and as far as i can tell i do not need any because i am using Nuget

And yes, i am extremelly sure of the user and password, as said above, the connection works when using SqlDeveloper

Oracle ManagedDataAccess Nuget

Oracle Article

Full 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"

UPDATE

Found this question that nailed the answer, a windows Registry settings that encrypted the password, in this question you can find the way to disabled on the registry or in the application config if you need

Solution

Hoku
  • 81
  • 10

0 Answers0