How to: Configure the Policy File
The following procedure details how to specify the policy file for an application's send-side or receive-side policy.
To specify the policy file in the configuration file
Add a <section> Element (WSE for Microsoft .NET) element to the <configuration> section of the configuration file of the XML Web service or the application.
Specify the microsoft.web.services2 configuration section handler for this configuration file.
The following code example shows how to add the microsoft.web.services2 configuration section handler.
<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> </configuration>
Add a <microsoft.web.services2> element to the <configuration> section of the Web.config file.
Add a <policy> Element (WSE for Microsoft .NET) (2) element under the <microsoft.web.services2> element.
Add a <cache> Element for <policy> element under the <policy> Element (WSE for Microsoft .NET) (2) element that specifies the name of the policy file.
Example
The following code example specifies that the policies for the Web application affected by the Web.config file are in a file named policyCache.xml
in the root folder of the Web application.
<configuration>
<microsoft.web.services2>
<policy>
<cache name="policyCache.xml" />
</policy>
</microsoft.web.services2>
</configuration>