SamlSerializer Class
Collapse the table of content
Expand the table of content

SamlSerializer Class

Serializes and deserializes SamlSecurityToken objects into and from XML documents.

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

public class SamlSerializer

XML serialization is the process of converting an object's public properties and fields to a serial format (in this case, XML) for storage or transport. Deserialization re-creates the object in its original state from the XML.

The SamlSerializer class serializes and deserializes SAML security tokens, which have an extensible format. Unlike many other security tokens, SamlSecurityToken security tokens include XML elements and attributes that can be customized for an application's needs. Some of the extensibility points for a SAML assertion include the <saml:Advice>, <saml:Condition>, and <saml:Statement> elements. For more details about overriding how each of these elements are read, see the LoadAdvice(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver), LoadCondition(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver), and LoadStatement(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) methods.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

© 2015 Microsoft