title: WCF NetTcpBinding Security - how does it work?
body: <p>I am encountering the following problems trying to work through the quagmire of settings in WCF...</p>
  
  <p>I created a WCF client-server service using a NetTcp binding. I didn't make any changes to the security settings and when running on one machine it works very nicely. However, when I ran my client from another machine it complained that the server didn't like the security credentials that were sent.</p>
  
  <p>I understand <em>now</em> that NetTCP is "secured" by default and that my client would have been passing the wrong security details - namely the Windows user name and password (or some form of domain authentication) to my server which as they are not running on the same domain it would not have liked.</p>
  
  <p>However, what I don't understand is as follows:</p>
  
  <p>I haven't specified any security in my binding - does the standard settings expect a Windows user name or password to be sent?</p>
  
  <p>I don't have any certificate installed on my server - I understand that NetTCP bindings need some form of public private key to protect the credentials - yet this seemed to work when both client and server were on the same machine - how was the data getting encrypted? Or wants it as WCF knew it was on the same machine and encryption isn't needed?</p>
  
  <p>I have had to set my security mode on my client and server to "none" now and they connect nicely. However is there a way to encrypt my data without a certificate?</p>
  
  <p>Finally... what is the difference between Transport and Message security? </p>
  
  <p>To check my understanding (excuse the scenario!) message security is like if I sent a letter from person A to person B and I encode my hand writing to ensure that if anyone intercepts it they cannot read it? Transport Security is if I decide to have my letter sent by armed transport so that no one can get at it along the way?</p>
  
  <p>Is it possible to have any form of encryption in WCF without a certificate? My project is a private project and I don't want to purchase a certificate and the data isn't that sensitive anyway so it's just for my own knowledge.</p>