LocalClientSecuritySettings.CookieRenewalThresholdPercentage Property

 

Gets or sets the threshold percentage for renewal of secure conversation cookies.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public int CookieRenewalThresholdPercentage { get; set; }

Property Value

Type: System.Int32

The threshold percentage for renewing secure conversation cookies. The default is 60 percent.

Exception Condition
ArgumentOutOfRangeException

The property is set to a value less than 0 or greater than 100.

The client caches secure conversation cookies and when a cached cookie is going to expire in the near future, the client automatically gets a new cookie from the service. The value of this property determines what percentage of the cached cookie's validity period must be over before getting a new cookie. For example, if the value of this property is 60, and the client has a secure conversation cookie that is valid for 100 minutes, it reuses the cached cookie for 60 minutes, after which it gets a new cookie from the service.

This example shows how to set the CookieRenewalThresholdPercentage member.

// Set to 20 minutes.
settings.CookieRenewalThresholdPercentage = 20;

.NET Framework
Available since 3.0
Return to top
Show: