SessionAuthenticationModule.TryReadSessionTokenFromCookie Method (SessionSecurityToken)

.NET Framework (current version)

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

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
Available since 4.5
Return to top