title: Configuring WCF client gives the error "The message could not be processed. This is most likely because the action
body: <p>My web service returns a error message no matter what configurations I set. I get the following error message.</p>
  
  <blockquote>
    <p><em>The message could not be processed. This is most likely because the action 'http://tempuri.org/ITestingWebService/DoWork' is incorrect or
    because the message contains an invalid or expired security context
    token or because there is a mismatch between bindings. The security
    context token would be invalid if the service aborted the channel due
    to inactivity. To prevent the service from aborting idle sessions
    prematurely increase the Receive timeout on the service endpoint's
    binding.</em></p>
  </blockquote>
  
  <p>Here are my server &amp; client <code>web.config</code> sections for WCF.</p>
  
  <p>Server:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
     &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
           &lt;behavior name="ConnectedStoreCCM.TestingWebServiceBehavior"&gt;
              &lt;serviceMetadata httpGetEnabled="true"  httpGetUrl="" /&gt;
              &lt;serviceDebug includeExceptionDetailInFaults="true"  /&gt;
           &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
     &lt;/behaviors&gt;
     &lt;bindings&gt;
        &lt;wsHttpBinding&gt;
           &lt;binding name="WSHttpBinding_ITestingWebService" 
               openTimeout="00:01:00" receiveTimeout="00:10:00"
               sendTimeout="00:10:00" bypassProxyOnLocal="false"
               transactionFlow="false" hostNameComparisonMode="StrongWildcard"
               messageEncoding="Text" textEncoding="utf-8"
               useDefaultWebProxy="true" allowCookies="false"
               maxReceivedMessageSize="2097152" maxBufferPoolSize="1024768"&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="None" /&gt;
                 &lt;message clientCredentialType="None" negotiateServiceCredential="false" 
                          establishSecurityContext="false" /&gt;
              &lt;/security&gt;
           &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
     &lt;/bindings&gt;
     &lt;services&gt;
         &lt;service behaviorConfiguration="ConnectedStoreCCM.TestingWebServiceBehavior"
                  name="ConnectedStoreCCM.TestingWebService"&gt;
            &lt;endpoint 
                address="" 
                binding="wsHttpBinding" 
                contract="ConnectedStoreCCM.ITestingWebService"&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://www.someuri.net/supertest/TestingWebService.svc?wsdl" /&gt;
               &lt;/baseAddresses&gt;
            &lt;/host&gt;
         &lt;/service&gt;
      &lt;/services&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Client:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;wsHttpBinding&gt;
          &lt;binding name="WSHttpBinding_ITestingWebService" closeTimeout="00:10:00" openTimeout="00:10:00"
               receiveTimeout="00:10:00" sendTimeout="00:10:00"
               bypassProxyOnLocal="false" transactionFlow="false"
               hostNameComparisonMode="StrongWildcard"
               messageEncoding="Text" textEncoding="utf-8"
               useDefaultWebProxy="true" allowCookies="false"
               maxBufferPoolSize="1024768"
               maxReceivedMessageSize="2097152" &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="None" /&gt;
              &lt;message clientCredentialType="None" negotiateServiceCredential="false" establishSecurityContext="false" /&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
     &lt;/bindings&gt;
     &lt;client&gt;
        &lt;endpoint name="WSHttpBinding_ITestingWebService" 
             address="http://www.someuri.net/supertest/TestingWebService.svc?wsdl"
             binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITestingWebService"
             contract="ServiceReference1.ITestingWebService" &gt;
           &lt;identity&gt;
              &lt;dns value="localhost" /&gt;
           &lt;/identity&gt;
        &lt;/endpoint&gt;
     &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>