WCF Reliable session without transport security will not faulted event on time

佐手、 提交于 2019-12-04 12:01:46

问题


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 faulted 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.


回答1:


NetTcp binding by default uses Transport security with Windows credentials. All bindings except BasicHttp and WebHttp are secured by default.



来源:https://stackoverflow.com/questions/4703732/wcf-reliable-session-without-transport-security-will-not-faulted-event-on-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!