var b = new CustomBinding(); var sec = new AsymmetricSecurityBindingElement( new X509SecurityTokenParameters(X509KeyIdentifierClauseType.Any, SecurityTokenInclusionMode.Never), new X509SecurityTokenParameters(X509KeyIdentifierClauseType.Any, SecurityTokenInclusionMode.AlwaysToRecipient)); sec.MessageSecurityVersion = MessageSecurityVersion.WSSecurity10WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10; sec.SecurityHeaderLayout = SecurityHeaderLayout.Strict; sec.IncludeTimestamp = true; sec.SetKeyDerivation(false); sec.KeyEntropyMode = System.ServiceModel.Security.SecurityKeyEntropyMode.ServerEntropy; sec.EnableUnsecuredResponse = true; b.Elements.Add(sec); b.Elements.Add(new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8)); b.Elements.Add(new HttpsTransportBindingElement());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)