Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SamlSerializer Property

IssuedTokenServiceCredential.SamlSerializer Property

Gets or sets the custom SamlSerializer for issued service credentials.

Namespace:  System.ServiceModel.Security
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public SamlSerializer SamlSerializer { get; set; }

Property Value

Type: System.IdentityModel.Tokens.SamlSerializer
The custom SamlSerializer for the service.


Attempted to set a read-only credential.

The issued tokens that this class uses are SAML tokens. Windows Communication Foundation (WCF) provides a default class SamlSerializer that is able to serialize and deserialize the majority of SAML tokens. If the service must process SAML tokens that contain elements that are not supported by the default serializer, this property can be used to provide a custom serializer capable of processing these elements.

The following code shows how to set this property.

ServiceCredentials creds = new ServiceCredentials();
creds.IssuedTokenAuthentication.SamlSerializer = new

The property can also be set in a configuration file.

    <!-- </configuration> -->
    <!-- </system.serviceModel -->
        <behavior name="CalculatorServiceBehavior">
            <issuedTokenAuthentication samlSerializerType="Samples.CustomSamlSerializer, CustomSample" />
          <serviceDebug includeExceptionDetailInFaults="true" />

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft