Dear admin,
I found some exceptions in the log file, please help me figure out this error and how to fix it:
- The first one is: I do not customize class Role : AbpRole<User>
Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not proxy Abp.EntityFramework.Repositories.EfRepositoryBase2[[Abp.Zero.EntityFramework.AbpZeroCommonDbContext
2[[MyNamespace.Authorization.Roles.Role, MyNamespace.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null],[MyNamespace.Authorization.Users.User, MyNamespace.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]], Abp.Zero.EntityFramework, Version=2.1.3.0, Culture=neutral, PublicKeyToken=null],[Abp.Localization.ApplicationLanguage, Abp.Zero.Common, Version=2.1.3.0, Culture=neutral, PublicKeyToken=null]] ---> System.ArgumentException: Unable to obtain public key for StrongNameKeyPair.
......
- The second one is: The website is running but sometime throw this exception. (note: the connection string is correct & db server working fine)
ERROR ComponentActivator: could not instantiate MyNamespace.EntityFramework.MyDbContext
Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate MyNamespace.EntityFramework.MyDbContext ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> 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 <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=386386">http://go.microsoft.com/fwlink/?LinkId=386386</a> 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: Connection request timed out
at OracleInternal.ConnectionPool.PoolManager
3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch) at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch) at OracleInternal.ConnectionPool.OracleConnectionDispenser
3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword) at Oracle.ManagedDataAccess.Client.OracleConnection.Open() at Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.GetDbProviderManifestToken(DbConnection connection) at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) --- End of inner exception stack trace --- at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) at System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) --- End of inner exception stack trace --- at System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) at System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.<>c__DisplayClass1.<ResolveManifestToken>b__0(Tuple3 k) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) at System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.ResolveManifestToken(DbConnection connection) at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) at System.Data.Entity.Internal.RetryLazy
2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() at Abp.EntityFramework.AbpDbContext.RegisterToChanges() at MyNamespace.EntityFramework.MyDbContext..ctor(String nameOrConnectionString) .... Please help me! Thanks in advance!
12 Answer(s)
-
0
System.ArgumentException: Unable to obtain public key for StrongNameKeyPair.
You need full access for one of these:
-
0
<cite>aaron: </cite>
System.ArgumentException: Unable to obtain public key for StrongNameKeyPair.
You need full access for one of these:
Thanks @aaron, But my iis-user is already have permission on this "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" folder :cry:
-
0
How about the user that runs the site?
-
0
<cite>aaron: </cite> How about the user that runs the site?
What do you mean aaron? Sorry I don't understand your question, can you explain more?
-
0
I mean the current user that builds and executes the application.
-
0
<cite>aaron: </cite> I mean the current user that builds and executes the application.
Dear @aaron, by default everyone have read / write permission on this folder and I checked. The strange thing is when I run on single server it doesn't throw exception but when I add to IIS-Farm the error will occurs.
-
0
Hi @VuCA,
Could it be a database access problem ? Maybe caused by a firewall ?
-
0
<cite>ismcagdas: </cite> Hi @VuCA,
Could it be a database access problem ? Maybe caused by a firewall ?
Hi ismcagdas,
How to finalize this issue? Can you tell me how to check this?
Notes: The website is working, I don't know sometime it's throw these exception and keep the CPU resource of the servers, until I restart app pool. I checked each server telnet to db successful.
Thanks!
-
0
Hi,
I'm not sure if this is related to AspNet Zero or Oracle. Can you try to increase connection timeout as suggested in here <a class="postlink" href="https://stackoverflow.com/a/32712423/6681451">https://stackoverflow.com/a/32712423/6681451</a> ?
-
0
<cite>ismcagdas: </cite> Hi,
I'm not sure if this is related to AspNet Zero or Oracle. Can you try to increase connection timeout as suggested in here <a class="postlink" href="https://stackoverflow.com/a/32712423/6681451">https://stackoverflow.com/a/32712423/6681451</a> ?
Dear ismcagdas,
I'll try to increase connection timeout as you suggested but I think it's not a reason in this case. Because when I run this website in single IIS Server everything is ok but when I join to IIS-Web Farm (include 5 server) then the issue will come. Do you have any ideal about it?
Thanks!
-
0
Hi @VuCA,
No, unfortunately nothing comes to my mind on AspNet Zero side. Have you checked if there are any configuration on Oracle side ?
-
0
<cite>ismcagdas: </cite> Hi @VuCA,
No, unfortunately nothing comes to my mind on AspNet Zero side. Have you checked if there are any configuration on Oracle side ?
<cite>ismcagdas: </cite> Hi @VuCA,
No, unfortunately nothing comes to my mind on AspNet Zero side. Have you checked if there are any configuration on Oracle side ?
:( :( :( :( So sad! Can you suggest some tools to check this problem, I'm sure there no any configuration on Oracle need, because many we use oracle in many site and no issue with this.