What should you do?

You create an XML Web service that uses the Trace class to output error messages, warning messages, and informational messages to a log file. The service uses a TraceSwitch object to filter the trace output.

The DisplayName property of the TraceSwitch object is “globalSwitch”. On a development computer, all trace output appears in the log file.

You move the service to a production computer. You must configure the production XML Web service to output only error messages to the log file.

What should you do?

You create an XML Web service that uses the Trace class to output error messages, warning messages, and informational messages to a log file. The service uses a TraceSwitch object to filter the trace output.

The DisplayName property of the TraceSwitch object is “globalSwitch”. On a development computer, all trace output appears in the log file.

You move the service to a production computer. You must configure the production XML Web service to output only error messages to the log file.

What should you do?

A.
To the Web.config file, add the following code segment:
<system.diagnostics>
<switches>
<add name=”globalSwitch” value=”1″ />
</switches>
</system.diagnostics>

B.
To the Web.config file, add the following code segment:
<system.diagnostics>
<switches>
<add name=”globalSwitch” value=”TraceSwitch” />
</switches>
</system.diagnostics>

C.
To the Web.config file, add the following code segment:
<system.diagnostics>
<switches>
<add name=”TraceSwitch” value=”1″ />
</switches>
</system.diagnostics>

D.
To the Web.config file, add the following code segment:
<system.diagnostics>
<switches>
<add name=”TraceSwitch” value=”globalSwitch” />
</switches>
</system.diagnostics>



Leave a Reply 0

Your email address will not be published. Required fields are marked *