What conclusion can you draw?

You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the design and development of application frameworks.
A developer named Clive Wilson is currently writing the following code for an Extensible Markup Language (XML) Web service:
(The line numbers are for reference purposes only.)
01 TraceSwitch generalSwitch = new TraceSwitch(“General”, “General Switch”);
02 Trace.WriteLinelf(generalSwitch.TraceError, “Cannot access mainframe computer”);
03 Trace.WriteLinelf(generalSwitch. TraceInfo, “Creating a new data file”);

Unfortunately the Web service is experiencing problems in production. To this end you decide that both the error message and the informational message need to be written to a Microsoft SQL Server 2005 database. Thus a custom trace listener is configured in the Web.config file to write the trace information to the database. Clive Wilson then sets the trace level to 1 (Error). You need to make a decision as to whether the solution is correct or not.

What conclusion can you draw?

You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the design and development of application frameworks.
A developer named Clive Wilson is currently writing the following code for an Extensible Markup Language (XML) Web service:
(The line numbers are for reference purposes only.)
01 TraceSwitch generalSwitch = new TraceSwitch(“General”, “General Switch”);
02 Trace.WriteLinelf(generalSwitch.TraceError, “Cannot access mainframe computer”);
03 Trace.WriteLinelf(generalSwitch. TraceInfo, “Creating a new data file”);

Unfortunately the Web service is experiencing problems in production. To this end you decide that both the error message and the informational message need to be written to a Microsoft SQL Server 2005 database. Thus a custom trace listener is configured in the Web.config file to write the trace information to the database. Clive Wilson then sets the trace level to 1 (Error). You need to make a decision as to whether the solution is correct or not.

What conclusion can you draw?

A.
The solution is correct.

B.
The solution is incorrect because Clive Wilson should set the trace level to 3(Info).

C.
The solution is incorrect because Clive Wilson should delete the code at line 02 and include the informational message with the error message.

D.
The solution is incorrect because Clive Wilson should delete the code at line 03 and include the informational message with the error message.

Explanation:
This solution is incorrect since Clive Wilson should rather set the trace level to 3. This trace level only indicates that only error, warning, and informational messages should be logged. Trace level ranges from 1 through 4 and the higher the trace level, the more types of messages it is capable of logging.
Incorrect answers:
A: There is definitely something wrong with the solution and thus this option is incorrect.
C: Clive Wilson should not delete the code at line 02 and include the error message with the informational message. It is possible to write both messages if the trace level is set to 3.
D: Clive Wilson should not delete the code at line 03 and include the error message with the informational message. It is possible to write both messages if the trace level is set to 3.

VB, Testing and Stabilizing an Application (10 Questions)



Leave a Reply 0

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