如何为WSS设置值-调用另一个SOAP服务的wcf服务中的生存时间?
您可以在WCF中设置inactivitytimeout属性的值。如果超过了InactivityTimeout指定的时间间隔且没有活动,则会话将被基础结构和通道故障中止。
您可以在配置文件中对其进行配置:
<bindings>
<wsHttpBinding>
<binding name="Binding">
<reliableSession inactivityTimeout="00:10:00"/>
</binding>
</wsHttpBinding>
</bindings>
我将超时时间设置为10分钟。如果客户端在10分钟内没有向服务器端发送任何消息,则连接将中断。
有关可靠会话和不活动超时的更多信息,请参考以下链接:
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/reliablesession