Share via


<cache> Element for <policy>

Specifies the policy file that contains the policy assertions for the application.

<microsoft.web.services2> Element
  <policy> Element (WSE for Microsoft .NET) (2)

<cache name="ReceivePolicies.config" />

Attributes and Elements

Attributes

Attribute Description

Name

Required attribute. The path to a policy file on the local computer containing the policy for the application.

Child Elements

None

Parent Elements

Element Description

<policy> Element (WSE for Microsoft .NET) (2)

Controls the policy settings for a WSE application.

Text Value

A text value is required. The text value is the URL for the security token service.

Remarks

Giving the policy file a .config file name extension prevents by default the file from being requested by a client application when this element is added to a configuration file for a Web service hosted by ASP.NET.

Before adding the <cache> element to a configuration file, you must add the microsoft.web.services2 configuration section handler to the configuration file. For details about adding the microsoft.web.services2 configuration section handler, see <section> Element (WSE for Microsoft .NET).

Example

The following code example specifies the policy file for receive side policy is the ReceivePolicies.xml file in the current directory.

<configuration>
  <microsoft.web.services2>
    <policy>
        <cache name="Policies.config"/>
    </policy>
  </microsoft.web.services2>
</configuration>

See Also

Reference

<policy> Element (WSE for Microsoft .NET) (2)

Concepts

Policy File Schema