SessionAuthenticationModule.TryReadSessionTokenFromCookie Method (SessionSecurityToken)

.NET Framework (current version)
 

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
)

Parameters

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
Show: