I have a simple WCF service that I communicate with asynchronously.
I don't like it when you call EndServiceMethod(IASyncResult)
if I forget to call the method Close(), the service will actually leave the connection open, and then all other connections will fail after wcf reaches the maximum number of concurrent connections with timeout exceptions.
I tried using the [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]
attribute of the service contract, which does not seem to affect the state of the connection to the service.
Perhaps I implemented it incorrectly?
Any ideas or suggestions.
I am trying to find a behavior pattern for WCF that allows clients to make a request, and then the server to respond to the request, and then assume that the connection is complete and can be completed.
source
share