Export (0) Print
Expand All

X509SecurityTokenHandler.WriteToken Method (XmlWriter, SecurityToken)

.NET Framework 4.6 and 4.5

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.

ExceptionCondition
ArgumentNullException

token is null.

-or-

writer is null.

ArgumentException

token is not assignable from X509SecurityToken.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft