Serialization error: Unable to find assembly 'EntityFramework

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
I've been having a problem with my nopcommerce 3.20 site for two weeks now, and can't get to the bottom of it.

I found this post from a month ago that is very similar, but not exact, and no solution was provided.

There appears to be no exact pattern in time as to when the errors occur, but each time, it's the same problem....several times per day.

3 errors in a row in Windows Application log:


First, this error appears in the Windows Application log:

An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 4472
Exception: System.Runtime.Serialization.SerializationException
Message: Unable to find assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
StackTrace:    at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.AppDomain.Deserialize(Byte[] blob)
   at System.AppDomain.UnmarshalObject(Byte[] blob)


...followed by this one:


Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Data.Entity.Core.EntityException
Stack:
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
   at System.Data.Entity.Internal.LazyEnumerator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Queryable.FirstOrDefault[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.IQueryable`1<System.__Canon>)
   at Nop.Services.Tasks.ScheduleTaskService.GetTaskByType(System.String)
   at Nop.Services.Tasks.Task.Execute(Boolean)
   at Nop.Services.Tasks.TaskThread.Run()
   at Nop.Services.Tasks.TaskThread.TimerHandler(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()


...and followed by this one:

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb1677
Exception code: 0xe0434352
Fault offset: 0x000000000000940d
Faulting process id: 0x1178
Faulting application start time: 0x01cf5295ec22ebb0
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 4d5e0de8-bea6-11e3-a3e0-005056882ce1


When this happens, I have a slew of errors in nop system log related to timeouts, and scheduled tasks don't fire correctly, etc..

The EntityFramework.dll is present in my /bin directory, and nowhere else. Isn't that correct?

Another problem I've been having is with scheduled tasks. That post is here. My processor usage hangs and Application pool becomes corrupt. The only way to solve the problem was to remove the app pool, create a new one and restart site using the new one. I've currently got the Delete Guests task disabled because it seems to be the one that goes haywire, and because no resolution was attained via my post....Maybe it's been going haywire because of that problem, or visa versa?

Anybody got a clue?

Thanks,
Steve
10 years ago
Exact same problem. Can somebody please help us.

Thanks.
10 years ago
I seems installing EntityFramework.dll in GAC solved the issue.
10 years ago
reyNOP wrote:
It seems installing EntityFramework.dll in GAC solved the issue.
10 years ago
I shrunk my database log files and it has now been over 36 hours since the error appeared in my Windows logs....becoming optimistic..
10 years ago
reyNOP wrote:
I seems installing EntityFramework.dll in GAC solved the issue.


Can you describe the steps you took please?
10 years ago
Im using windows server 2012 and using powershell I able to install EntityFramework.dll in GAC.

Here's the link : http://camerondwyer.wordpress.com/2013/05/22/how-to-install-a-dll-to-the-gac-on-windows-2012-using-only-powershell-without-having-to-install-sdk-or-visual-studio/
10 years ago
Thanks!

I will try that if the problem reappears anytime soon. Just manually shrinking the database log seems to have stopped the errors for me...

Steve
9 years ago
Try disabling all schedule tasks except some one. Test and wait until the application crashes. If it happens, then we'll know what schedule task causes it. If no, then test some other task the same way. This way we can find which schedule task causes it.

Also what SQL Server edition and version are you using?
9 years ago
OK, we will do that.

We are also finding that if we are settings NOP Template Plugin settings it causes the crash. (We think.)
We are using SQL 2012.

We are seeing the app is timing out waiting to talk to SQL server.
It says it has run out of connections in the pool.

More shortly.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.