1

I have an ASP.NET MVC 3 application that uses Entity Framework 4.3 code first. The application works satisfactorily with the WebDev server in Visual Studio. Once the application is running in IIS 7.5, it is, it occasionally happens that the server no longer responds. The browser waits until it times out. Also, a refresh of the page does not help. Only if the browser is closed and restarted the IIS provides responses back to the browser.

The work processes are utilized here to 0%. An infinite loop is ruled out as cause therefore. When I examine the worker process with the debugger, all threads are in the external code. Even with WinDbg I can not identify the cause.

The application uses the DbContext together with the UnitOfWork pattern. The controllers receive an UnitOfWork object via dependency injection. The dependency resolution is done with the UnityDependencyResolver of the Unity.Mvc package. The Entity Framwork is also used in my own MembershipProvier and role providers, but here is the DbContext explicitly created and destroyed.

I'm desperate. What could cause this behavior?

54v054r3n
  • 394
  • 2
  • 10
  • You're likely running in to session locking in .NET which is preventing additional requests by your session from being processed by IIS while the other process is running. Closing the browser and opening a new one likely generates a new session. Here is a SO question somewhat releated: http://stackoverflow.com/questions/2927726/asynchronous-controller-is-blocking-requests-in-asp-net-mvc-through-jquery I suspect that something is causing the thread to stick and hang and then due to session locking the rest of the requests are hung – Nick Bork May 16 '12 at 19:57
  • A good hint, but sessions are switched off. So there is no deadlock because of the sessions. – 54v054r3n May 19 '12 at 12:11

0 Answers0