title: How can I configure a TransportSecurityBindingElement for a CustomBinding within a web.config?
body: <p>I have the following (reduced) code that I'd like to configure through a web.config</p>
  
  <pre><code>var security = new TransportSecurityBindingElement();
  security.EndpointSupportingTokenParameters.SignedEncrypted.Add(new UserNameSecurityTokenParameters());
  
  var binding = new CustomBinding(security);
  </code></pre>
  
  <p>Is it possible to configure this custom binding using the web config? If it is possible how could I configure the endpoint supporting token parameters? I've tried The following config, however it does not validate against DotNetConfig.xsd:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
    &lt;bindings&gt;
      &lt;customBinding&gt;
        &lt;binding name="SomeBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"&gt;
          &lt;transportSecurity&gt; &lt;!-- Fails validation --&gt;
              &lt;!-- How do I configure the EndpointSupportingTokenParameters --&gt;             
          &lt;/transportSecurity&gt;
        &lt;/binding&gt;
      &lt;/customBinding&gt;
    &lt;/bindings&gt;
    &lt;client&gt;
      ...
    &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>