title: WS-Security using the ASMX file in ASP.NET 3.5
body: <p>Basically I need to setup my ASMX file so that when I pull it up in a browser to display the WebMethod specification the Soap Header conforms to this format:</p>
  
  <pre><code>&lt;soap:Header&gt;
     &lt;wsse:Security&gt;
        &lt;wsse:UsernameToken wsu:Id='SecurityToken-securityToken'&gt;
           &lt;wsse:Username&gt;Username&lt;/wsse:Username&gt;
           &lt;wsse:Password&gt;Password&lt;/wsse:Password&gt;
           &lt;wsu:Created&gt;Timestamp&lt;/wsu:Created&gt;
        &lt;/wsse:UsernameToken&gt;
     &lt;/wsse:Security&gt;
  &lt;/soap:Header&gt;
  </code></pre>
  
  <p>Back-story: I'm integrating with a client application that is already built (and owned by another company). Basically this client application already has their soap messages all set up from its past integrations with other companies. So we've opted to just build a web service using an ASMX file that matches the WSDL that they're already setup to consume.</p>
  
  <p>Is it possible to get WS-Security working on an ASMX file or is ASMX too simplistic and I have to upgrade to WFC (which I really don't want to do)?</p>