PrepAway - Latest Free Exam Questions & Answers

Which two actions should you perform?

You migrate a Windows Server .NET web application to Azure Cloud Services.
You need enable trace logging for the application.
Which two actions should you perform? Each correct answer presents part of the solution.

PrepAway - Latest Free Exam Questions & Answers

A.
Update the service definition file.

B.
Update the Azure diagnostics configuration.

C.
Update the service configuration file.

D.
Enable verbose monitoring.

E.
Update the application web.config file.

Explanation:
http://msdn.microsoft.com/en-us/library/azure/ee758711.aspx http://msdn.microsoft.com/enus/magazine/ff714589.aspx

18 Comments on “Which two actions should you perform?

  1. Arie says:

    I believe that the answer is A and C. You seem to need to import the diagnostics module in your service definition file and set the connection string in your service configuration file.




    0



    0
  2. @lx says:

    http://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-diagnostics/

    I think B and E…

    Configuration File Schema

    The Diagnostics configuration file defines values that are used to initialize diagnostic configuration settings when the diagnostics monitor starts. A sample configuration file and detailed documentation on its schema is located.

    Data Source:

    System.Diagnostics.Trace Logs

    Logs trace messages sent from your code to the trace listener (a trace listener must be added to the web.config or app.config file). Log data will be transferred at the scheduledTransferPeriod transfer interval to storage table WADLogsTable.




    1



    0
  3. Yok says:

    https://msdn.microsoft.com/en-us/library/azure/hh411522.aspx

    Configure the TraceListener in an Azure Application

    Updated: December 22, 2014
    When using Trace, Debug and TraceSource, you must have a mechanism for collecting and recording the messages that are sent. Trace messages are received by listeners. The purpose of a listener is to collect, store, and route tracing messages. Listeners direct the tracing output to an appropriate target, such as a log, window, or text file. For Windows Azure Diagnostics, the DiagnosticMonitorTraceListener class is used. Before you complete the following procedure, you must initialize the Windows Azure diagnostic monitor. To do this, see Enabling Diagnostics in Windows Azure.




    0



    0
  4. fred says:

    I don’t understand why B,E.
    I read all the provided links and the answer is clearly A,B.

    Let’s take this one for instance:
    https://msdn.microsoft.com/en-us/library/azure/Dn482131.aspx#BKMK_step5

    * Step 1 section I read:
    “diagnostics monitor is imported into a role by specifying an Import element with a moduleName of “Diagnostics” in the Imports section of the service definition file”

    So A is a part of the answer.

    * The other part is B. Step 2 explain how to add the diagnostic file in the solution and step 3 how to configure it.

    So the answer is A,B
    —————————-

    * There are nothing to do in the service configuration file. You can also check the schema definition here:
    https://msdn.microsoft.com/en-us/library/azure/ee758710.aspx

    Nothing related to logging. So C can’t be part of the solution

    * D is debatable I thing, but only 2 actions are asked, and if we don’t provide A and B, D has no effects

    * E: yes we can configure the logging in web.config. But it means that every time we have to do a change, we must redeploy.

    https://msdn.microsoft.com/en-us/library/ff714589.aspx




    0



    0
  5. Nijntje says:

    A+C what a question!

    The default System.Diagnostics code knows about settings only in app.config or web.config, but your roles will get run-time notification of changes in ServiceConfiguration.cscfg through the RoleEnvironmentChanging and RoleEnvironmentChanged events. You can then decide whether to recycle (restart) the role or simply update a configuration value. The latter is what you want for tracing switches. Restarting the role may make intermittent problems disappear. The sample code for this article shows how to do this by adding a couple of values to ServiceConfiguration.cscfg (note that you have to also edit ServiceDefinition.csdef, which provides the schema) and adding some code to your roles.




    0



    0
  6. Nijntje says:

    A+C what a question!

    The default System.Diagnostics code knows about settings only in app.config or web.config, but your roles will get run-time notification of changes in ServiceConfiguration.cscfg through the RoleEnvironmentChanging and RoleEnvironmentChanged events. You can then decide whether to recycle (restart) the role or simply update a configuration value. The latter is what you want for tracing switches. Restarting the role may make intermittent problems disappear. The sample code for this article shows how to do this by adding a couple of values to ServiceConfiguration.cscfg (note that you have to also edit ServiceDefinition.csdef, which provides the schema) and adding some code to your roles




    0



    0
  7. RobV says:

    Still digging into question, but do not think it is (A). If enabling tracing using (A), you’re redeploying the project each time as changes to service definition file require redeploying the app. On the other hand, can update the service configuration (C) without redeploying app. Right now, leaning (B) and (C)




    0



    0

Leave a Reply