I've just spent half a day with my colleague Sérgio to get this thing working, and I've decided to share it with the community. The deal was to enable transport security on a basicHttpBinding in a self-hosted WCF service. I am not going into the service