title: The server has rejected the client credentials
body: <p>I have a WCF service with net.tcp binding, hosted on the server as a Windows service. I am not able to access this service. However I was able to do so, when I hosted it on my local network.</p>
  <h3>Error Recieved</h3>
  <blockquote>
  <p>Message:** The server has rejected the client credentials.
  <br/></p>
  <p><strong>Inner Exception:</strong>   <br/></p>
  </blockquote>
  <pre><code>System.Security.Authentication.InvalidCredentialException:
  The server has rejected the client credentials.
  ---&gt; System.ComponentModel.Win32Exception:
  The logon attempt failed --- End of inner exception stack trace
  --- at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
  at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
  at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
  at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty&amp; remoteSecurity)
  </code></pre>
  <p>Tried searching for the solution, but found none that fits my requirements, hence posted here.</p>
  <p>What could be the problem?</p>
  <p>If I make my security mode to None on the client</p>
  <pre><code>&lt;security mode=&quot;None&quot;&gt;&lt;/security&gt;
  </code></pre>
  <p>I get another error:</p>
  <blockquote>
  <p><strong>Error:</strong> The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.5149722'.</p>
  </blockquote>