I have a WCF service configured like this:
InstanceContextMode = InstanceContextMode.PerCall,
ConcurrencyMode = ConcurrencyMode.Multiple
I have a method where I call the service about ten times per second for about 30 seconds. Randomly, the service stop to work and the client is stopped on the line where the service is called.
On the server side, I have a static object "MyStaticObject" (Not declared in my service, this is an other class on the server). This object is a Dictionnary that contains some instanced objects in which there is a backgroundworker.
I don't think there is a deadlock in the database since it lock when I try to access the service and not when I try to access the database.
I currently lock my dictionnary this way:
lock (MyClass.MyStaticLockObject)
{
MyClass.MyStaticObject...;
}
I'd like to know what could cause this kind of weird behavior.