SessionAuthenticationModule.WriteSessionTokenToCookie Method (SessionSecurityToken)

.NET Framework (current version)
 

Writes the specified SessionSecurityToken to a session cookie.

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

public void WriteSessionTokenToCookie(
	SessionSecurityToken sessionToken
)

Parameters

sessionToken
Type: System.IdentityModel.Tokens.SessionSecurityToken

The session security token to write.

Exception Condition
ArgumentNullException

sessionToken is null.

InvalidOperationException

There is not a valid session token handler configured. (There is no SessionSecurityTokenHandler configured in the SecurityTokenHandlers property.)

Writes the cookie by using the cookie handler that is configured in the CookieHandler property.

.NET Framework
Available since 4.5
Return to top
Show: