.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

"ContextSwitchDeadlock was detected"

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :Windows Application

I have several transactions between the application and the database here. I am bringing the data from a csv file and inserting/updating the database after checking if it alread yexists.
This will be around 400 records here. But it might be more than this number.

I never faced the issue in development environment when the database is on:
Windows 2008 server(remote connection)
On my laptop : windows 7

This is occuring on a database at client location. the database is on windows 2003 server


"ContextSwitchDeadlock was detected" error message popping up when debugging.

The CLR has been unable to transition from COM context 0x197060 to COM context 0x196ef0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

Is there any other way to fix this issue?



View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend