SessionSecurityTokenHandler.WriteToken Method (SessionSecurityToken)

.NET Framework (current version)
 
System_CAPS_noteNote

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

Serializes the specified token into a byte array.

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

public virtual byte[] WriteToken(
	SessionSecurityToken sessionToken
)

Parameters

sessionToken
Type: System.IdentityModel.Tokens.SessionSecurityToken

The token to write.

Return Value

Type: System.Byte[]

An encoded byte array.

Exception Condition
ArgumentNullException

sessiontoken is null.

Serializes the specified token by creating and XML writer over a MemoryStream and invoking the SessionSecurityTokenHandler.WriteToken(XmlWriter, SecurityToken) method. See that overload for more details.

.NET Framework
Available since 4.5
Return to top
Show: