From: Sanjay on
See the following article to find the solution ::

http://harriyott.com/2006/05/contextswitchdeadlock-was-detected.aspx

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=271410&SiteID=1

Hope it helps.