nerdexam
Microsoft

70-516 · Question #257

You are developing a Microsoft .NET Framework 4 application. You need to collect performance data to the event log after the application is deployed to the production environment. Which two…

The correct answer is B. A trace listener C. Trace.WriteLine() statements. Tracing is a way for you to monitor the execution of your application while it is running. For example, suppose you set up two listeners: a TextWriterTraceListener and an EventLogTraceListener. Each listener receives the same message. The TextWriterTraceListener would direct…

Deploying and Troubleshooting Data Access

Question

You are developing a Microsoft .NET Framework 4 application. You need to collect performance data to the event log after the application is deployed to the production environment. Which two components should you include in the project? (Each correct answer presents part of the solution. Choose two.)

Options

  • AA debug listener
  • BA trace listener
  • CTrace.WriteLine() statements
  • DDebug.Asset() statements
  • EDebug.WriteLineQ statements

How the community answered

(19 responses)
  • A
    11% (2)
  • B
    84% (16)
  • D
    5% (1)

Explanation

Tracing is a way for you to monitor the execution of your application while it is running. For example, suppose you set up two listeners: a TextWriterTraceListener and an EventLogTraceListener. Each listener receives the same message. The TextWriterTraceListener would direct its output to a stream, and the EventLogTraceListener would direct its output to an The following example shows how to send output to the Listeners collection. // Use this example when debugging. System.Diagnostics.Debug.WriteLine("Error in Widget 42"); // Use this example when tracing. System.Diagnostics.Trace.WriteLine("Error in Widget 42");

Topics

#trace listeners#event logging#diagnostics#performance monitoring

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice