How to: Configure the Security Token Manager for a Custom Security Token

After a security token manager has been created for a custom XML security token, it must be configure to specify the security token manager that WSE should call when WSE receives a SOAP message that contains a security token not natively supported by WSE.

To configure a security token manager for a custom XML security token

  • Add a <securityTokenManager> Element element to the configuration files for the SOAP message sender and receiver.

    The following code example specifies that the security token manager for contoso:Token security tokens is the CustomXmlSecToken.XmlTokenManager type.

    <configuration>
        <configSections>
            <section name="Microsoft.Web.Services2"
                     type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </configSections>
    
        <microsoft.web.services2>
            <security>
                <securityTokenManager
                   type="CustomXmlSecToken.XmlTokenManager, CustomXmlSecToken"
                   xmlns:contoso="https://www.contoso.com/tokens/customXml"
                   qname="contoso:Token" /> 
            </security>
        </microsoft.web.services2>
    </configuration>
    

    Note

    Before adding the <securityTokenManager> Element element, the microsoft.web.services2 configuration handler must be registered by using the <section> Element (WSE for Microsoft .NET) element.

See Also

Tasks

How to: Create a Security Token Manager for a Custom Security Token

Reference

<securityTokenManager> Element
<section> Element (WSE for Microsoft .NET)

Other Resources

Creating Custom Security Tokens