I ran into a Threading problem and would like to share my findings.
In my application in the WCF Services Designer, I called AutoMapperRegistry. Configure () to create mappings for automatic matching.
From the MVC controller, I call the service by calling the singleton WCF service object .
actual problem is related to the web client . I actually called asyncrounusly two of the controller methods so that both are passed to the service and the result is returned. The moment I changed the first method to Async false, the problem was resolved .
Cause When both methods are called async, a race condition also occurs from time to time that it resolves on its own, sometimes this threading problem is created, resulting in the above exception being thrown.
Desmond
source share