I’m currently using Hangfire in a ASP.NET MVC 5 project, which use Ninject, to use the same Context in RequestScope.
I defined a custom Kernel for Hangfire, which does not add “.InRequestScope()”
In Hangfire dashboard, I get random errors like
System.Data.Entity.Core.EntityException: An error occurred while starting a transaction on the provider connection. See the inner exception for details. ---> System.Data.SqlClient.SqlException: New transaction is not allowed because there are other threads running in the session.
How can I use Entity, ASP.NET and Hangfire, without getting all those transactions errors?
I bet those errors can happen on the other side (in web).