Export (0) Print
Expand All

SessionAuthenticationModule.TryReadSessionTokenFromCookie Method

.NET Framework 4.6 and 4.5

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

Namespace:  System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public bool TryReadSessionTokenFromCookie(
	out SessionSecurityToken sessionToken


Type: System.IdentityModel.Tokens.SessionSecurityToken

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

Return Value

Type: System.Boolean
true if the session cookie was successfully read from the request; otherwise, false.

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.

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft