title: How to use WS-Security and Access UsernameToken from an ASMX Web Service?
body: <p>Okay, so we have a legacy ASMX web service that is currently running in .NET 3.5 and we're using Visual Studio 2008.</p>
  
  <p>The problem is, we need to add authentication and would like to take advantage of the WS-Security model without breaking any existing internal clients who don't need to authenticate currently.</p>
  
  <p>We've thought about adding custom headers, but that's not very WS-Security-ish.  Also upgrading to WCF, while a long term goal, is not viable in the short-term.</p>
  
  <p>Is there a way to access the UsernameToken (provided it's passed by the client) indirectly in the soap header of a VS2008 ASMX web service?</p>