问题
I have a asp.net/mvc 3/entity framework 4.1 web application which access a class library to get look up table data. When I hit the website for the first time and try to load two different pages simultaneously the app pool hangs. No dead lock or any activity in the database. I used windbg/vs2010 debugger to look for thread locks. Two threads are locking at System.Component.TypeDescriptor
.
The execution gets stuck at lookuptable.ToList
Code :
Using transaction As New TransactionScope(TransactionScopeOption.RequiresNew,
New TransactionOptions() With
{.IsolationLevel = IsolationLevel.ReadUncommitted})
Using db As New Entity
Dim lookuptable = From lk In db.LookUpTable Where lk.Id = pId Select lk
returnValue = lookuptable.ToList
End Using
End Using
Parallel stack image:
Thanks for your help
来源:https://stackoverflow.com/questions/15816602/deadlock-with-entity-framework-linq