protected override SecurityBindingElement CreateSecurityBindingElement() { if (SecurityMode.Message == base.SecurityMode) { return(SecurityBindingElement.CreateCertificateSignatureBindingElement()); } if (SecurityMode.Transport == base.SecurityMode) { //return SecurityBindingElement.CreateUserNameOverTransportBindingElement(); return(SecurityBindingElement.CreateCertificateOverTransportBindingElement()); } if (SecurityMode.TransportWithMessageCredential == base.SecurityMode) { return(SecurityBindingElement.CreateCertificateOverTransportBindingElement()); } return(null); }