title: The binding to use to communicate to the federation service at url is not specified
body: <p>I'm currently using ADFS as a security token service. I want to federate the WCF service with ADFS. I created WCF service and added the STS reference of ADFS by using Federation utility.</p>
  
  <p>Inorder to use the federated wcf service, I created WPF application and added service reference. I called the service api using following code.</p>
  
  <pre class="lang-cs prettyprint-override"><code>var client = new SecureWpfApplication.ServiceReference1.Service1Client();
  
  Uri uri = new Uri("http://tempuri.org/");
  ICredentials credentials = CredentialCache.DefaultCredentials;
  NetworkCredential credential = credentials.GetCredential(uri, "Basic");
  
  client.ClientCredentials.Windows.ClientCredential = credential;
  
  client.ClientCredentials.SupportInteractive = false;
  
  client.GetData(323);
  </code></pre>
  
  <p>I got the error "The binding to use to communicate to the federation service at 'https://{ADFS server}/adfs/services/trust/13/usernamemixed' is not specified.</p>
  
  <p>How to resolve this? </p>
  
  <p>I created the wcf service configuration like</p>
  
  <pre><code>&lt;services&gt;
    &lt;service name="SecureWcfService.Service1" behaviorConfiguration="SecureWcfService.ServiceBehaviour"&gt;
      &lt;endpoint address="https://wcfserver/SampleWcfService/Service1.svc" binding="ws2007FederationHttpBinding" contract="SecureWcfService.IService1" bindingConfiguration="SecureWcfService.IService1_ws2007FederationHttpBinding" /&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;behaviors&gt;
  &lt;serviceBehaviors&gt;
      &lt;behavior name="SecureWcfService.ServiceBehaviour"&gt;
        &lt;federatedServiceHostConfiguration name="SecureWcfService.Service" /&gt;
        &lt;serviceMetadata httpGetEnabled="true" /&gt;
        &lt;serviceCredentials&gt;
          &lt;serviceCertificate findValue="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" /&gt;
        &lt;/serviceCredentials&gt;
      &lt;/behavior&gt;
  &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;extensions&gt;
      &lt;behaviorExtensions&gt;
          &lt;add name="federatedServiceHostConfiguration" type="Microsoft.IdentityModel.Configuration.ConfigureServiceHostBehaviorExtensionElement, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
          &lt;/behaviorExtensions&gt;
  &lt;/extensions&gt;
  &lt;bindings&gt;
  &lt;ws2007FederationHttpBinding&gt;
      &lt;binding name="SecureWcfService.IService1_ws2007FederationHttpBinding"&gt;
          &lt;security mode="Message"&gt;
              &lt;message&gt;
                  &lt;issuerMetadata address="https://adfsserver/adfs/services/trust/mex" /&gt;
                  &lt;claimTypeRequirements&gt;
                      &lt;add claimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" isOptional="true" /&gt;
                      &lt;add claimType="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" isOptional="true" /&gt;
                  &lt;/claimTypeRequirements&gt;
              &lt;/message&gt;
          &lt;/security&gt;
      &lt;/binding&gt;
  &lt;/ws2007FederationHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;microsoft.identityModel&gt;
      &lt;service&gt;
          &lt;audienceUris&gt;
              &lt;add value="https://wcfserver/SecureWcfService/Service1.svc" /&gt;
          &lt;/audienceUris&gt;
          &lt;issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
              &lt;trustedIssuers&gt;
                  &lt;add thumbprint="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" name="http://asfsserver/adfs/services/trust" /&gt;
                  &lt;add thumbprint="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" name="http://adfsserver/adfs/services/trust" /&gt;
              &lt;/trustedIssuers&gt;
          &lt;/issuerNameRegistry&gt;
          &lt;certificateValidation certificateValidationMode="None" /&gt;
      &lt;/service&gt;
  &lt;/microsoft.identityModel&gt;   
  </code></pre>
  
  <p>I got the error "The binding to use to communicate to the federation service at '<a href="https://adfsserver.com/adfs/services/trust/13/usernamemixed" rel="nofollow">https://adfsserver.com/adfs/services/trust/13/usernamemixed</a>' is not specified.</p>