Saml2SecurityTokenHandler.WriteNameId Method (XmlWriter, Saml2NameIdentifier)

.NET Framework (current version)
 

Writes the <saml:NameID> element.

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

protected virtual void WriteNameId(
	XmlWriter writer,
	Saml2NameIdentifier data
)

Parameters

writer
Type: System.Xml.XmlWriter

The XmlWriter with which to serialize the Saml2NameIdentifier.

data
Type: System.IdentityModel.Tokens.Saml2NameIdentifier

The Saml2NameIdentifier to be serialized.

Exception Condition
ArgumentNullException

data is null.

-or-

writer is null.

CryptographicException

The Saml2NameIdentifier encrypting credentials must have a Symmetric Key specified.

.NET Framework
Available since 4.5
Return to top
Show: