title: WCF self hosted HTTPS with custom UserNamePasswordValidator
body: <p>I have a WCF service which is running fine.</p>
  
  <ul>
  <li>It is used within an intranet network. </li>
  <li>It is a self-hosted service
  (no IIS) managed by a simple Windows Form program. </li>
  <li>It is used by a
  WCF client (WPF C#).</li>
  </ul>
  
  <p>I now need to add security to it and after having read a lot of posts on the internet I'm getting confused as there are many ways of doing.</p>
  
  <p>I need a custom username and password validator (I will have to call another web service to know if user is authorized or not).
  I also need secure communication between client and server.</p>
  
  <p>I am currently using basicHttpBinding.
  MS recommends the use of NetTcpBinding in my case (<a href="https://msdn.microsoft.com/en-us/library/ff648863.aspx#TransportSecurityWCF" rel="nofollow">https://msdn.microsoft.com/en-us/library/ff648863.aspx#TransportSecurityWCF</a>), but I am not sure if this is or can be secured ?</p>
  
  <p>I think I better use WsHttpBinding to have SSL: do you think that this link provides proper solution to my case ? <a href="https://msdn.microsoft.com/en-us/library/ms733775.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/ms733775.aspx</a> ?</p>
  
  <p>Thanks for your advices</p>