Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)
Use the PolicyEnforcementSecurityTokenCache class when you enable policy for outgoing SOAP messages. When policy for outgoing SOAP messages is enabled, WSE uses the PolicyEnforcementSecurityTokenCache returned from the GlobalCache property to obtain security tokens that meet the policy requirements to sign, encrypt, and/or add security tokens to SOAP messages. SOAP message senders can add security tokens to either the PolicyEnforcementSecurityTokenCache or directly to the SoapContext for the SOAP message when policy is used for outgoing SOAP messages. When the SOAP message is sent, WSE evaluates the policy to determine the security token requirements and then first looks in the Tokens property of the Security property of the current SoapContext to find a security token that adheres to the policy. If none are found, WSE then searches the tokens in the PolicyEnforcementSecurityTokenCache for a security token that adheres to the policy. For more information about using send-side policy, see Configuring a Web Service's Policy.