开发者

WCF Reliable Session Timeout

when do reliable sessions time out?

My session class is defined as follows:

[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]

and in my app.config...

<bindings>
      <netTcpBinding>
        <binding name="FTS_netTcpBinding">
          <reliableSession enabled="true" inactivityTimeout="00:00:30"/>          
        </bindin开发者_Python百科g>        
      </netTcpBinding>           
    </bindings>

I have put a timer in the constructor of my session class that simply outputs a count (1..2..3...) to the console for every second the session is active.

I have tested it so far by faulting my channel. I would have imagined that the session class would have died after ~30 seconds (as specified in my inactivityTimeout parameter) and hence the timer would have died. However it was still going after a minute.

Each session on my app will have significant resources so I need to make sure that they are cleaned up when something goes wrong.

Thanks.


I now believe that the session will time out after the ReceiveTimeOut has elapsed. That is the session instance has not received any data for that amount of time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜