SessionSecurityToken.IsReferenceMode Property

Definition

Gets or sets a value that indicates whether the session security token is operating in reference mode.

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

Property Value

true if the token is operating in session mode; otherwise, false.

Remarks

In reference mode, a simple artifact is produced during serialization and the token material is stored in the token cache that is associated with the token handler. The token cache is an instance of a class that derives from SessionSecurityTokenCache. For Web Farm scenarios, the token cache must operate across all nodes in the farm.

Important

To operate in reference mode, Microsoft recommends providing a handler for the WSFederationAuthenticationModule.SessionSecurityTokenCreated event in the global.asax.cs file and setting the IsReferenceMode property on the token passed in the SessionSecurityTokenCreatedEventArgs.SessionToken property. This will ensure that the session token operates in reference mode for every request and is favored over merely setting the SessionAuthenticationModule.IsReferenceMode property on the Session Authentication Module.

Applies to

See also