LocalClientSecuritySettings.ReplayCacheSize Property

Definition

Gets or sets the number of cached nonces used for replay detection.

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

Property Value

The number of cached nonces used for replay detection. The default is 900000.

Examples

This example shows how to get the number of cached nonces to use for replay detection.

int replayCacheSize = settings.ReplayCacheSize;
Dim replayCacheSize As Integer = settings.ReplayCacheSize

Remarks

A nonce is a "number used once", often a random number used in an authentication protocol to ensure that old communications cannot be used in an attack by using replays.

If the nonce count is exceeded, the incoming message is rejected and a MessageSecurityException is thrown. Old nonces are removed in a timely manner.

Applies to