IssuedTokenClientCredential.IssuedTokenRenewalThresholdPercentage Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the renewal threshold percentage for issued tokens.

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

public int IssuedTokenRenewalThresholdPercentage { get; set; }

Property Value

Type: System.Int32

The renewal threshold percentage for issued tokens. The default value is 60.

Exception Condition
InvalidOperationException

An attempt was made to set a read-only credential.

The client caches issued tokens and when a cached issued token is going to expire in the near future, the client automatically gets a fresh issued token from the Security Token Service. The value of this property determines what percentage of the cached issued token's validity period must be over before getting a fresh issued token.

For example, if this property's value is 60, and the client gets an issued token that is valid for 100 minutes, it reuses the cached issued token for 60 minutes, after which it gets a fresh issued token from the Security Token Service.

This code shows how to set this property.

itcc.IssuedTokenRenewalThresholdPercentage = 80;

.NET Framework
Available since 3.0
Return to top
Show: