SecurityTokenHandlerCollection.WriteToken Method (XmlWriter, SecurityToken)

.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 security token to XML.

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

public void WriteToken(
	XmlWriter writer,
	SecurityToken token
)

Parameters

writer
Type: System.Xml.XmlWriter

The XML writer.

token
Type: System.IdentityModel.Tokens.SecurityToken

The token to serialize.

Exception Condition
ArgumentNullException

token is null.

-or-

writer is null.

InvalidOperationException

The collection does not contain a handler capable of serializing the specified token.

.NET Framework
Available since 4.5
Return to top
Show: