X509SecurityTokenHandler.WriteToken Method (XmlWriter, SecurityToken)

.NET Framework (current version)
 

Serializes the specified X.509 security token to the specified XML writer.

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

public override void WriteToken(
	XmlWriter writer,
	SecurityToken token
)

Parameters

writer
Type: System.Xml.XmlWriter

The XML writer to which the token should be serialized.

token
Type: System.IdentityModel.Tokens.SecurityToken

The X.509 security token to serialize. An instance of X509SecurityToken.

Exception Condition
ArgumentNullException

token is null.

-or-

writer is null.

ArgumentException

token is not assignable from X509SecurityToken.

.NET Framework
Available since 4.5
Return to top
Show: