Share via


LocalClientSecuritySettings.ReplayWindow 属性

定义

获取或设置消息 Nonce 有效的最长时间。

public:
 property TimeSpan ReplayWindow { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan ReplayWindow { get; set; }
member this.ReplayWindow : TimeSpan with get, set
Public Property ReplayWindow As TimeSpan

属性值

一个 TimeSpan,表示消息 Nonce 有效的最长时间。 默认值为 5 分钟。

例外

此属性使用 set 设置为一个小于 0 的值。

示例

此示例演示如何获取此属性。

TimeSpan replayWindow = settings.ReplayWindow;
Dim replayWindow As TimeSpan = settings.ReplayWindow

注解

nonce 是一个“使用一次的数字”,通常是身份验证协议中使用的随机数字,以确保旧通信不能在攻击中使用重播。

适用于