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

1

6

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.

Vacuity answered 16/1, 2011 at 4:6 Comment(2)
What exactly is the question? Are you asking why it is so? ... or what you can do about it, if anything?Kastroprauxel
Yes, sorry being unclear. I wanted to know why it is so and have posted a workaround for it.Vacuity
T
0

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

Threecornered answered 16/1, 2011 at 9:23 Comment(1)
Yes that's correct. That is why I had to explicitly set securitymode to None and reliable session no longer raise faulted on time.Vacuity

© 2022 - 2024 — McMap. All rights reserved.