title: WCF what should be the endpointConfigurationName?
body: <p>I have the following config for my WCF service:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;services&gt;
    &lt;service behaviorConfiguration="After.BehaviourConfig" name="ServiceInstancingDemo.Service1"&gt;
      &lt;endpoint address="" binding="wsHttpBinding" bindingConfiguration="After.BindingConfig"
        name="After.ConfigName" contract="ServiceInstancingDemo.IService1"&gt;
        &lt;identity&gt;
          &lt;dns value="localhost" /&gt;
        &lt;/identity&gt;
      &lt;/endpoint&gt;
      &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;
      &lt;host&gt;
        &lt;baseAddresses&gt;
          &lt;add baseAddress="http://rb-t510/NGCInstancing/Service1.svc" /&gt;
        &lt;/baseAddresses&gt;
      &lt;/host&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;bindings&gt;
    &lt;wsHttpBinding&gt;
      &lt;binding name="After.BindingConfig" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" maxBufferPoolSize="524288111" maxReceivedMessageSize="524288111" allowCookies="false"&gt;
        &lt;security mode="None" /&gt;
      &lt;/binding&gt;
    &lt;/wsHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="After.BehaviourConfig"&gt;
        &lt;serviceMetadata httpGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
        &lt;serviceThrottling maxConcurrentCalls="30" maxConcurrentInstances="2147483647" maxConcurrentSessions="30" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am able to call the service with the following client code:</p>
  
  <pre><code>NGC.Service1Client ngc = new NGC.Service1Client();
  
          var taskA = Task&lt;string&gt;.Factory.StartNew(() =&gt; ngc.WaitThenReturnString(5));
  
          this.listBox1.Items.Add(taskA.Result);
  </code></pre>
  
  <p>The config for the client that calls the service is as follows:</p>
  
  <pre><code> &lt;system.serviceModel&gt;
      &lt;bindings&gt;
          &lt;wsHttpBinding&gt;
              &lt;binding name="Before" closeTimeout="00:01:00" openTimeout="00:01:00"
                  receiveTimeout="00:10:00" sendTimeout="00:01:00" maxBufferPoolSize="524288111"
                  maxReceivedMessageSize="524288111" allowCookies="false" /&gt;
              &lt;binding name="After" closeTimeout="00:01:00" openTimeout="00:01:00"
                  receiveTimeout="00:10:00" sendTimeout="00:01:00" maxBufferPoolSize="524288111"
                  maxReceivedMessageSize="524288111" allowCookies="false"&gt;
                  &lt;security mode="None" /&gt;
              &lt;/binding&gt;
              &lt;binding name="WSHttpBinding_IService1" closeTimeout="00:01:00"
                  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                  bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                  maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                  messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                  allowCookies="false"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                      maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
                  &lt;reliableSession ordered="true" inactivityTimeout="00:10:00"
                      enabled="false" /&gt;
                  &lt;security mode="None"&gt;
                      &lt;transport clientCredentialType="Windows" proxyCredentialType="None"
                          realm="" /&gt;
                      &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/wsHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://rb-t510/NGCInstancing/Service1.svc"
              binding="wsHttpBinding" bindingConfiguration="Before" contract="NGCInstance.IService1"
              name="Before" /&gt;
          &lt;endpoint address="http://rb-t510/NGCInstancing/Service1.svc"
              binding="wsHttpBinding" bindingConfiguration="After" contract="NGCInstance.IService1"
              name="After" /&gt;
          &lt;endpoint address="http://rb-t510/NGCInstancing/Service1.svc"
              binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1"
              contract="NGC.IService1" name="WSHttpBinding_IService1"&gt;
              &lt;identity&gt;
                  &lt;dns value="localhost" /&gt;
              &lt;/identity&gt;
          &lt;/endpoint&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Problem is, I want to add another endpoint that will execute the same functionality but with a different behavior. To do this, I think I'm going to need to pass a string of the enpointConfigurationName to the constructor in the line=new NGC.Service1Client. I don't know what string I need to pass - I would have expected it to be the endpoint configuration name "After.ConfigName" but I tried this and got the following error message:</p>
  
  <p><em>Could not find endpoint element with name 'After.ConfigName' and contract 'NGC.IService1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.</em></p>
  
  <p>Can anyone please help?</p>