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
Ok, we set the all background services to run every 1 second to cause a load fault.
It did.

We also checked with performance monitor the SQL server pools and the connection pool is not being overloaded.
It is not running past 20 odd connections which is well within the 100 connections for a standard connections string.

If we set the email task to run very 5 seconds... and everything else to run every 1 second.

We created a simple email with a bad address.

The system that crashed and we watched the pool go through the roof past 100 connections.

So we have a problem with the email service. It is not releasing connections on a retry. We think.
10 years ago
crmstrategy wrote:
...

Do not set everything to run 1 second and email task to 5 seconds. You should disable all services except email task and try to reproduce it.

I'm not sure that it's caused by email service. I cannot reproduce.

Regarding "We created a simple email with a bad address". It cannot crash the system. We have appropriate try-catch block for such email addresses.
10 years ago
Ok, the fault looked like it was email but it seems the fault happened as we were emailing.
We have since restarted, change the email settings to 15 seconds. Turned everything else off.

The system is not faulting.

We are progressively turning on services and it is not faulting.

We now at least have seen the connection pool fill. So there is something there consuming connections.
10 years ago
A day or so after I reported it had been awhile since the errors occurred, we continued having the original errors again.

I followed the advice given above about registering the EntityFramework.dll into the Global Assembly Cache, and cleared my application logs to watch for the errors. No errors in log for over 20 hours now, but without having realized it immediately, doing so has caused my development site to fault...this is the error in the Windows application log whenever any page on my development site is accessed:

Event code: 3005 
Event message: An unhandled exception has occurred.
Event time: 4/28/2014 4:10:52 PM
Event time (UTC): 4/28/2014 11:10:52 PM
Event ID: 493d7027738b4f36b9a3b9f03c7921e2
Event sequence: 2
Event occurrence: 1
Event detail code: 0

Application information:
    Application domain: /LM/W3SVC/11/ROOT-1-130432002326878750
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\inetpub\wwwroot\MFS_DEV_3point3\
    Machine name: WIN-DDE4FB9847H

Process information:
    Process ID: 5740
    Process name: w3wp.exe
    Account name: IIS APPPOOL\MFS_DEV

Exception information:
    Exception type: HttpException
    Exception message: An exception was thrown while executing a resolve operation. See the InnerException for details. ---> An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct. (See inner exception for details.)
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

..................(more here..removed to shorten)

The provider did not return a ProviderManifestToken string.
   at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
   at System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)

Method not found: 'System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher System.Data.Entity.Infrastructure.Interception.DbDispatchers.get_Connection()'.
   at System.Data.Entity.SqlServer.SqlProviderServices.GetDbProviderManifestToken(DbConnection connection)
   at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)



Request information:
    Request URL: http://64.239.149.226/
    Request path: /
    User host address: 10.10.10.28
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: IIS APPPOOL\MFS_DEV

Thread information:
    Thread ID: 6
    Thread account name: IIS APPPOOL\MFS_DEV
    Is impersonating: False
    Stack trace:    at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)


I verified my connection string is perfect, and I can manually connect to the database with no problems...how do I fix this?

Thanks,
Steve
10 years ago
a.m. wrote:
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?


I have had no tasks enabled for weeks now, and yet the same 3 errors related to the EntityFramework.dll not being found (on my initial post) have continued to occur usually once or twice daily, but some days not at all.
Yesterday I manually registered the EntityFramework.dll into the GAC on my server and have been hopeful that the errors will cease, and that I can re-enable my scheduled tasks.

As I posted a few moments ago, however, doing so has caused yet another issue for me, but this time, on my development site.

I am using SQL Server Express 2008 R2

UPDATE:  

I un-installed the EntityFramework.dll from the GAC and my development site again functions, but I expect the original errors to re-appear at any moment...

Any help would be greatly appreciated!

Steve
9 years ago
Hello again....

I'm still having the 3 errors that I initially reported in this topic, and am unable to enable any scheduled tasks.

Message: Unable to find assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


That's how it all goes bad, so I am searching everywhere for reference to it...
All I can find is this reference in the web.config:

      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>


...it references version 5 as the new version....

Is this the problem?

Help??

Steve
9 years ago
I feel kinda like my topic was hi-jacked and then forgotten. I am replying in hopes that it catches someone's attention this time..
9 years ago
embryo wrote:
I feel kinda like my topic was hi-jacked and then forgotten. I am replying in hopes that it catches someone's attention this time..

It catches attention. But it's not clear how to reproduce it. it works fine in 99.999% cases. I presume it's somehow related to GAC.
9 years ago
a.m. wrote:
I feel kinda like my topic was hi-jacked and then forgotten. I am replying in hopes that it catches someone's attention this time..
It catches attention. But it's not clear how to reproduce it. it works fine in 99.999% cases. I presume it's somehow related to GAC.


OK, so this reference is good?

      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>


At runtime we specify the EntityFramework newversion is version 5...

The error I get says it cannot find EntityFramework version 6:

Message: Unable to find assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


(same publicKeyToken)


As I mentioned in a previous post, when I do register the EF into my GAC, it causes my Development site to fault:

An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. 


Can you tell me how the connection string is defined in the EF?

Thanks-
Steve
9 years ago
I don't think that matters. But try to replace "5.0.0.0" with "6.0.0.0"

What version of EntityFramework.dll do you have in the root \bin directory? Open the properties window in Visual Studio for this file reference in Nop.Web project. See "Version" property
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.