Serialization error: Unable to find assembly 'EntityFramework

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Well...I never really figured out why it started happening, but with some effort, I registered the EF dll into my server's GAC and the errors finally ceased. It is certainly a bug, but I couldn't say for sure who deserves the blame.  :-)

Steve
9 years ago
An EF appears to registered into the .NET 4 MSIL so I am assuming that whatever requires it has access but this Microsoft crap is too esoteric for me:

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.ServiceModel.DomainServices.EntityFramework\v4.0_4.0.0.0__31bf3856ad364e35


I applied security updates.  The assembly pool is still crashing randomly.

I am assuming that the problem is the guest cleanup task.

I really want to banish all guests from Russia and China...................
9 years ago
The problem isn't actually with the scheduled task, but that's more than likely the "trigger." I had to disable all scheduled tasks for about a month before we got it straightened out..a lot of manual database cleanup in the meantime.

The path you pasted there is to the EF  v. 4

Version 3.20 of nopC was the last to use v. 5 of the EF, and 3.30 uses v.6.1

If I were you, I'd unregister whatever EF dll's are in the GAC, and do it again, but when you do, be sure to specify the path to the EF within your website.

(this assumes you have the "gacutil.exe", "gacutil.exe.config", and "gacutlrc.dll" in the root of your C drive)


unregister:

C:\>gacutil.exe /u EntityFramework.dll


register:

C:\>gacutil.exe /i C:\path\to\your\website\bin\EntityFramework.dll


Oh...and be sure you execute these commands from an MS-DOS prompt that has been run as an Administrator or it won't work right.

Also, have you tried manually changing the filegrowth settings on your logs as well as your database? Maybe it's the logfiles that are autogrowing too much??

Steve
9 years ago
embryo wrote:
The problem isn't actually with the scheduled task, but that's more than likely the "trigger." I had to disable all scheduled tasks for about a month before we got it straightened out..a lot of manual database cleanup in the meantime.

The path you pasted there is to the EF  v. 4

Version 3.20 of nopC was the last to use v. 5 of the EF, and 3.30 uses v.6.1

If I were you, I'd unregister whatever EF dll's are in the GAC, and do it again, but when you do, be sure to specify the path to the EF within your website.

(this assumes you have the "gacutil.exe", "gacutil.exe.config", and "gacutlrc.dll" in the root of your C drive)


unregister:

C:\>gacutil.exe /u EntityFramework.dll


register:

C:\>gacutil.exe /i C:\path\to\your\website\bin\EntityFramework.dll


Oh...and be sure you execute these commands from an MS-DOS prompt that has been run as an Administrator or it won't work right.

Also, have you tried manually changing the filegrowth settings on your logs as well as your database? Maybe it's the logfiles that are autogrowing too much??

Steve


Hi Embryo,

Thanks for your effort in giving some ideas on this issue.

I had the same issue last night with my vps. It was on and off repeatedly for all the http requests. And throwing 503. Same codebase and assemblies were running in the system with out this error since last feb. It lasted about 2 hrs. After 2 VPS restarts, it was working again.


Since last week i added a scheduled job (runs every midnight) in my office PC to get price and stock information from our vendors and update it to the nopcommerce database on the VPS. This is nothing to do with nop commerce. its a pure bare-metal ADO .Net update into Product Table.

So i strongly suspect, log file in the database caused the issue. So just cleaned the database. Lets see how it goes.

Jey.
9 years ago
Hi Guys,

Culprit repeated again. Had same issue last night. This time i let it happen for some time and observed server parameters.

Items observed following,
Memory Spike on SQL Server process in Ram. We are using sql express and it consumed around 900MB. We have about 2GB Ram + 2GB Page file.
CPU Spike on SQL Server Process. SQL Server Process was consuming about 60-70% of CPU in very frequent spikes.

Then Entity Frame work not found same issue was thrown.

Once after i just restarted the SQL Server (Not the Server), all went under-control.

Our Server is hosted in VPS. Do you guys have any clue on this behavior?
9 years ago
I got the same error.Even i changed the entity framework version from 5.0.0.0 to 6.0.0.0.still error remains there.So anybody suggest me another idea to solve the error.
8 years ago
I have the same error, but with nopCommerce 3.60 on a Azure Website with an Azure SQL Database. Being an Azure Website, I do not have access to the GAC...

In the Website event log, I see the following error (reformating mine)


Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/1/2015 6:01:11 AM
Event time (UTC): 10/1/2015 6:01:11 AM
Event ID: db5baa4a207b4f9eb4bc313a4f98bdf7
Event sequence: 49
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/666059990/ROOT-1-130881515152597231
Trust level: Full
Application Virtual Path: /
Application Path: D:\home\site\wwwroot\
Machine name: RD00155D51CE41

Process information:
Process ID: 9408
Process name: w3wp.exe
Account name: IIS APPPOOL\nop-app-pool

Exception information:
Exception type: EntityException
Exception message: The underlying provider failed on Open.
  at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
  at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
  at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
  at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5()
  at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
  
An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy.
  at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
  at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
  
Database 'nop-DB' on server 'ajsvfimdeg' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of '87CC18BF-5F58-44C7-91C8-21D6A956FD6B'.
  at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
  at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
  at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
  at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
  at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
  at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
  at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
  at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken)
  at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
  at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
  at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
  at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
  at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
  at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
  at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
  at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
  at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
  at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
  at System.Data.SqlClient.SqlConnection.Open()
  at System.Data.SqlClient.SqlConnection.Open()
  at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
  at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
  at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.b__0()
  at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)


Request information:
Request URL: http://nop.mydomain.com/contactus
Request path: /contactus
User host address: x.x.x.x
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\nop-app-pool

Thread information:
Thread ID: 5
Thread account name: IIS APPPOOL\nop-app-pool
Is impersonating: False
Stack trace: at System.Data.Entity.Core.EntityClient.EntityConnection.Open() at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)

Custom event details:
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.