WCF Reliable session without transport security will not faulted event on time
I have encountered a very interesting behavior of reliable session. I am using netTcp binding + duplex channel + reliable session.
When I am trying to listen on channel.faulted , if there is security mode is set to transport , faulted event would fire immediately when client disconnects.
However when I set binding's security mode to None or Message, faulted event no longer fires in the same situation. They will eventually get fault开发者_JS百科ed half of ReciveTimeout on server side which I understands as reliable session would send a heart beat message at that time.
The question is: Why the wcf binding does not get faulted on time?
The workaround for this case is I can manually "ping" connections.
NetTcp binding by default uses Transport security with Windows credentials. All bindings except BasicHttp and WebHttp are secured by default.
精彩评论