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.
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
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.
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.
http://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/
Enable diagnostics logging for web apps in Azure App Service
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.
I also think is B and E
http://blogs.msdn.com/b/mcsuksoldev/archive/2014/09/04/adding-trace-to-azure-web-sites-and-web-jobs.aspx
Another article referencing same thing
https://msdn.microsoft.com/en-us/library/azure/Dn482131.aspx#BKMK_step5
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
Agree with Fred.
A+B (original answer)
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.
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
B+E are the correct answers:
Both steps are explained here:
https://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-diagnostics-trace-flow/
A+B
A is confirmed.
As for B, the csdef for Cloud Services would need modification in the WorkerRole (even WebRole has this entry) Schema. Module name to be updated with ‘diagnostics’ in either WebRole or WorkerRole. Both these schemas have moduleName as diagnostics along with RemoteAccess and RemoteForwarder under Import.
https://msdn.microsoft.com/en-us/library/azure/gg557552.aspx
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)
Yes, deploy is necessary. But why is it a problem? Question doesn’t state if App should be redeployed or not.
In order to enable trace logging, Service Definition File (A) needs to be modified to tell the app to enable diagnostics.
And besides, there is no setting for Trace Logging or Diagnostics in Service Configuration (C) – https://msdn.microsoft.com/en-us/library/azure/jj156091.aspx
Hence only A & B.
Correct Answer : B E
So, A+B
Or B+E?
929969 652194I visited a lot of website but I conceive this one contains something special in it in it 673844