This documentation is archived and is not being maintained.

SamlSerializer.LoadStatement Method

Reads a SAML statement using the specified XML reader.

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

public virtual SamlStatement LoadStatement(
	XmlDictionaryReader reader,
	SecurityTokenSerializer keyInfoSerializer,
	SecurityTokenResolver outOfBandTokenResolver


Type: System.Xml.XmlDictionaryReader

An XmlDictionaryReader to read the SAML statement.

Type: System.IdentityModel.Selectors.SecurityTokenSerializer

A SecurityTokenSerializer that reads the KeyInfo clause of the digital signature.

Type: System.IdentityModel.Selectors.SecurityTokenResolver

A SecurityTokenResolver that determines the security token that created the digital signature.

Return Value

Type: System.IdentityModel.Tokens.SamlStatement
A SamlStatement that represents the SAML statement.


reader is null.

SamlSecurityToken security tokens specify their claims using SAML assertions where the details of the claims are specified in SAML statements. The SAML specification defines the following statement types:

The LoadStatement(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) method reads the SAML statements listed previously. When custom statements are defined and used by an application, create a serializer to read the contents of them. To create the custom serializer, derive a class from SamlSerializer and override the LoadStatement(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) method. Custom SAML statements are contained within a <saml:Statement> element.

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