title: A call to SSPI failed, see inner exception when running the call a second time?
body: <p>I have the following code : </p>
  
  <pre><code>public GetUserDataResponse GetUserDataFromService(X509Certificate2 certificate)
  {
      ChannelFactory&lt;MyApp4SITHSService.IMyApp4SITHSServiceContract&gt; factory = new ChannelFactory&lt;MyApp4SITHSService.IMyApp4SITHSServiceContract&gt;("NetTcpBinding_IMyApp4SITHSServiceContract_Certificate");
      MyApp4SITHSService.IMyApp4SITHSServiceContract service;
      GetUserDataResponse response;
  
      factory.Credentials.ClientCertificate.Certificate = certificate;
      //factory.Credentials.UserName.UserName = "me";
      //factory.Credentials.UserName.Password = "password";
  
      service = factory.CreateChannel();
  
      LogHandler.WriteLine("Connecting to service");
      response = service.GetUserData(new GetUserDataRequest());
      LogHandler.WriteLine("Data received");
  
      factory.Abort();
      return response;
  }
  </code></pre>
  
  <p>The first time I run this it workes just great, the second time I get the following exception on service.GetUserData : </p>
  
  <blockquote>
    <blockquote>
      <p>A first chance exception of type 'System.ServiceModel.Security.SecurityNegotiationException' occurred
      in mscorlib.dll</p>
      
      <p>A call to SSPI failed, see inner exception.</p>
      
      <p>The Local Security Authority cannot be contacted</p>
    </blockquote>
  </blockquote>
  
  <p>Im using the following configurations : </p>
  
  <pre><code>&lt;system.serviceModel&gt;
    &lt;behaviors&gt;
      &lt;endpointBehaviors&gt;
        &lt;behavior name="CertificateEndpointBehavior"&gt;
          &lt;clientCredentials&gt;
            &lt;!--&lt;clientCertificate findValue="MyAppClient" x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="TrustedPeople"/&gt;--&gt;
            &lt;!--&lt;clientCertificate findValue="MyAppClient" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/&gt;--&gt;
            &lt;serviceCertificate&gt;
              &lt;authentication certificateValidationMode="ChainTrust" revocationMode="NoCheck"/&gt;
            &lt;/serviceCertificate&gt;
          &lt;/clientCredentials&gt;
        &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;
    &lt;/behaviors&gt;
      &lt;bindings&gt;
          &lt;netTcpBinding&gt;
              &lt;binding name="netTcpCertificate" closeTimeout="00:01:00" openTimeout="00:01:00"
                  receiveTimeout="Infinite" sendTimeout="01:00:00" transactionFlow="false"
                  transferMode="Buffered" transactionProtocol="OleTransactions"
                  hostNameComparisonMode="StrongWildcard" listenBacklog="1000"
                  maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
                  maxConnections="200" maxReceivedMessageSize="2147483647"&gt;
                  &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                      maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt;
                  &lt;reliableSession ordered="true" inactivityTimeout="Infinite"
                      enabled="false" /&gt;
                  &lt;security mode="Transport"&gt;
                      &lt;transport clientCredentialType="Certificate" /&gt;
                      &lt;message clientCredentialType="Certificate" /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="net.tcp://localhost:8135/MyApp4SITHSService/Client/sll"
              behaviorConfiguration="CertificateEndpointBehavior" binding="netTcpBinding"
              bindingConfiguration="netTcpCertificate" contract="MyApp4SITHSService.IMyApp4SITHSServiceContract"
              name="NetTcpBinding_IMyApp4SITHSServiceContract_Certificate"&gt;
              &lt;identity&gt;
                  &lt;dns value="MyAppServer" /&gt;
              &lt;/identity&gt;
          &lt;/endpoint&gt;
      &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Any idea why I get this problem and how to solve it?</p>