Condividi tramite


<detailedErrors> Element

Controls whether a stack trace is returned when there is a fault generated from the Web service.

<microsoft.web.services3> Element
  <diagnostics> Element

<detailedErrors enabled="true|false" />

Attributes and Elements

Attributes

Attribute Description

enabled

Required attribute. true if detailed stack traces should be sent when a fault is generated in a call to a Web service; otherwise, false. The default value is false.

Child Elements

None

Parent Elements

Element Description

<diagnostics> Element

Controls the diagnostics settings for the Microsoft Web Services Enhancements.

Remarks

Use the <detailedErrors> option to specify that the complete stack trace should be sent if a fault is generated during a call to a Web service. This option applies to all calls to a Web service regardless of the underlying protocol, however for Web services hosted by ASP.NET, the <customErrors> element takes precedence over the <detailedErrors> element. For example, when the following configuration file is used for a Web service hosted by ASP.NET, detailed errors are not returned to the client even though the enabled attribute of the <detailedErrors> element is set to true, because the mode attribute is set to On for the <customErrors> element.

<configuration>
  <system.web>
    <customErrors mode="On" />
  </system.web>
  <microsoft.web.services3>
    <diagnostics> 
      <detailedErrors enabled="true" />
    </diagnostics>
  </microsoft.web.services3>
</configuration>

For more details about the <customErrors> element, see the .NET Framework SDK documentation.

Before adding the <diagnostics> element to a configuration file, you must add the microsoft.web.services3 configuration section handler to the configuration file. For details about adding the microsoft.web.services3 configuration section handler, see <section> Element.

For more information about using WSE diagnostic settings, see Troubleshooting WSE Applications.

Example

The following code example specifies that detailed error messages are returned by WSE.

<configuration>
  <microsoft.web.services3>
    <diagnostics> 
      <detailedErrors enabled="true" />
    </diagnostics>
  </microsoft.web.services3>
</configuration>

See Also

Reference

<diagnostics> Element