Export (0) Print
Expand All

UserNameSecurityTokenHandler.WriteToken Method (XmlWriter, SecurityToken)

.NET Framework 4.5

Serializes the specified UserNameSecurityToken to XML.

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 use to serialize the token.

token
Type: System.IdentityModel.Tokens.SecurityToken

The token to serialize.

ExceptionCondition
ArgumentNullException

writer is null.

-or-

token is null.

InvalidOperationException

token is not assignable from UserNameSecurityToken.

.NET Framework

Supported in: 4.6
Show:
© 2014 Microsoft