title: WCF error: wshttpbinding The caller was not authenticated by the service
body: <p>I have created the WCF stateful service and consume it in my window application. I have faced "The caller was not authenticated by the service" issue While running the application. </p>
  
  <p>Web.Config file:</p>
  
  <pre><code>&lt;bindings&gt;
  
        &lt;wsHttpBinding&gt;
          &lt;binding name="wsHttpBinding1" messageEncoding="Text" textEncoding="utf-8"&gt;
            &lt;!--&lt;security mode="None"&gt;--&gt;
            &lt;security mode="Message"&gt;
              &lt;!--&lt;transport clientCredentialType="None"/&gt;--&gt;
              &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt;
              &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
  &lt;/bindings&gt;
  
  &lt;services&gt;
  
  &lt;service name="REST.IPBX" behaviorConfiguration="ServiceBehavior"&gt;
          &lt;endpoint address="" binding="wsHttpBinding" contract="WCF_IPBX.IIPBX"&gt;
            &lt;identity&gt;
              &lt;dns value="http://xyz.xxx.w.y/"/&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;
        &lt;/service&gt;
  &lt;/services&gt;
  
  &lt;serviceBehaviors&gt;
  
  &lt;behavior name="ServiceBehavior"&gt;
            &lt;serviceMetadata httpGetEnabled="true"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
  &lt;/serviceBehaviors&gt;
  </code></pre>