<policyTrace> Element
Specifies whether policy enforcement and verification is traced and if so where to write the trace.
<microsoft.web.services2> Element
<diagnostics> Element
<policyTrace enabled="true|false"
input="File name to write trace of incoming SOAP messages."
output="File name to write trace of sent SOAP messages."/>
Attributes and Elements
Attributes
Attribute | Description |
---|---|
enabled |
Required attribute. Specifies whether policy tracing is enabled. The default value is false. |
input |
Optional attribute. Specifies the file in which to trace policy verification for messages being received. The default value is receivePolicy.webinfo. |
output |
Optional attribute. Specifies the file in which to trace policy verification and enforcement for messages being sent. The default value is sendPolicy.webinfo. |
Child Elements
None
Parent Elements
Element | Description |
---|---|
Controls the diagnostics settings for the Microsoft Web Services Enhancements. |
Remarks
Before adding the <policyTrace> 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).
When the file name specified in an input or output attribute does not contain a path, the file is written to the folder containing the configuration file.
When enabling policy tracing for an Web service, it is recommended that the file name have an extension of .webinfo or .config. By default, users cannot request files with these extensions using a Web browser.
Policy tracing can be turned on for both Web services and client applications.
To give an account full control access to a policy trace file
- Open Windows Explorer.
- Navigate to the folder containing the trace file.
- Select the trace file.
- From the File menu, select Properties.
- On the Security tab, add the account and select the Full Control option.
Example
The following code example specifies that policy tracing is enabled and specifies the files that the policy trace is written to for incoming and sent SOAP messages.
<configuration>
<microsoft.web.services2>
<diagnostics>
<policyTrace enabled="true"
input="receivePolicy.webinfo"
output="sendPolicy.webinfo"/>
</diagnostics>
</microsoft.web.services2>
</configuration>