Export (0) Print
Expand All

FederatedMessageSecurityOverHttp.IssuerBinding Property

Gets or sets the binding to be used by the client when communicating with the security token service whose endpoint address equals IssuerAddress.

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

public Binding IssuerBinding { get; set; }

Property Value

Type: System.ServiceModel.Channels.Binding
The Binding to be used by the client when communicating with the security token service.

This property is used to specify the binding that is used by the client between the client and the security token service when obtaining credentials for the service.

Note that this property does not need to be populated on the service, since it is only consumed by the client.

The following code shows how to access this property from the binding, and set it.

	// This method creates a WSFederationHttpBinding. 
	public static WSFederationHttpBinding 
        CreateWSFederationHttpBinding(bool isClient)
	  // Create an instance of the WSFederationHttpBinding.
	  WSFederationHttpBinding b = new WSFederationHttpBinding();

	  // Set the security mode to Message.
	  b.Security.Mode = WSFederationHttpSecurityMode.Message;
	  // Set the Algorithm Suite to Basic256Rsa15.
	  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15;

	  // Set NegotiateServiceCredential to true.
	  b.Security.Message.NegotiateServiceCredential = true;

	  // Set IssuedKeyType to Symmetric.
	  b.Security.Message.IssuedKeyType = SecurityKeyType.SymmetricKey;

	  // Set IssuedTokenType to SAML 1.1
	  b.Security.Message.IssuedTokenType = 

	  // Extract the STS certificate from the certificate store.
	  X509Store store = new X509Store(StoreName.TrustedPeople, StoreLocation.CurrentUser);
	  X509Certificate2Collection certs = store.Certificates.Find(
          X509FindType.FindByThumbprint, "0000000000000000000000000000000000000000", false);
	  // Create an EndpointIdentity from the STS certificate.
	  EndpointIdentity identity = EndpointIdentity.CreateX509CertificateIdentity ( certs[0] );
	  // Set the IssuerAddress using the address of the STS and the previously created  
      // EndpointIdentity.
	  b.Security.Message.IssuerAddress = 
          new EndpointAddress(new Uri("http://localhost:8000/sts/x509"), identity);

	  // Set the IssuerBinding to a WSHttpBinding loaded from configuration.  
      // The IssuerBinding is only used on federated clients. 
      if (isClient)
          b.Security.Message.IssuerBinding = new WSHttpBinding("Issuer");

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

© 2014 Microsoft