Note that there are some explanatory texts on larger screens.

plurals
  1. POCan I auto generate an STS binding for WsFederationHttpBinding endpoints via MEX
    primarykey
    data
    text
    <p>I have a WCF service that exposes a WsFederationHttpBinding endpoint programatically. I want to then use Visual Studio to create a client side endpoint using the service reference dialog. The client generates the correct endpoint and binding but I must manually create a binding in the client config for the STS and hook it up to the issuer element of the federated service binding. Is there a way to create the server side binding so that the STS binding is automatically generated on the client?</p> <p>This is basically how I generated the binding in code:</p> <pre><code>public class MyServiceHost : ServiceHostFactory { protected override void AddServiceEndpoint(ServiceHost host, Type contract, Uri address) { var binding = new WSFederationHttpBinding(); // set up some binding properties here binding.Security = new WSFederationHttpSecurity { Mode = WSFederationHttpSecurityMode.Message, Message = new FederatedMessageSecurityOverHttp { AlgorithmSuite = SecurityAlgorithmSuite.Default, EstablishSecurityContext = true, IssuedTokenType = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1", NegotiateServiceCredential = false, IssuerAddress = new EndpointAddress( new Uri("http://mydomain/STSService.svc"), EndpointIdentity.CreateSpnIdentity("http/IDENTITYMASKED")), IssuerBinding = new WSHttpBinding { Name = "stsBinding", Security = new WSHttpSecurity { Mode = SecurityMode.Message, Message = new NonDualMessageSecurityOverHttp { ClientCredentialType = MessageCredentialType.Windows, NegotiateServiceCredential = true, AlgorithmSuite = SecurityAlgorithmSuite.Default, EstablishSecurityContext = false } } } } }; host.AddServiceEndpoint(contract, binding, address); } } </code></pre> <p>When I generated a proxy to this in Visual Studio the stsBinding isnt there in configuration or hooked up, is there a way to get this to happen or does MEX not allow it? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload