SessionAuthenticationModule.TryReadSessionTokenFromCookie Method

Definition

Attempts to read a SessionSecurityToken from a session cookie and returns a value that indicates whether the session cookie was successfully read.

C#
public bool TryReadSessionTokenFromCookie(out System.IdentityModel.Tokens.SessionSecurityToken sessionToken);

Parameters

sessionToken
SessionSecurityToken

When this method returns, contains the session security token that was read from the session cookie.

Returns

true if the session cookie was successfully read from the request; otherwise, false.

Remarks

Reads the cookie by using the cookie handler that is configured in the CookieHandler property and then invokes the ReadSessionTokenFromCookie method to read the token from the cookie.

Applies to

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1