You need to enable message logging and include all security information such as tokens and nonces in logged messages

Your Windows Communication Foundation (WCF) client application uses HTTP to

communicate with the service. You need to enable message logging and include all security
information such as tokens and nonces in logged messages. What should you do?

Your Windows Communication Foundation (WCF) client application uses HTTP to

communicate with the service. You need to enable message logging and include all security
information such as tokens and nonces in logged messages. What should you do?

A.
In the application configuration file, add the following XML segment to the
system.serviceModel configuration section group. <diagnostics> <messageLogging
logMessagesAtTransportLevel=”true” logEntireMessage=”true” /> </diagnostics>

B.
In the machine configuration file, add the following XML segment to the
system.serviceModel configuration section. <machineSettings
enableLoggingKnownPii=”true” /> Generate the ContosoService class using the Add
Service Reference wizard. Add the following code segment. ContosoService client = new
ContosoService(); client.Endpoint.Behaviors.Add(new CallbackDebugBehavior(true));

C.
In the application configuration file, add the logKnownPii attribute to the message logging
diagnostics source and set the value of the attribute to true. Generate the ContosoService
class using the Add Service Reference wizard. Add a reference to
System.ServiceModel.Routing.dll. Add the following code segment. ContosoService client =
new ContosoService(); SoapProcessingBehavior behavior = new
SoapProcessingBehavior(); behavior.ProcessMessages = true;
client.Endpoint.Behaviors.Add(behavior);

D.
In the machine configuration file, add the following XML segment to the
system.serviceModel configuration section. <machineSettings
enableLoggingKnownPii=”true” /> In the application configuration file, add the logKnownPii
attribute to the message logging diagnostics source and set the value of the attribute to true.
In the application configuration file, add the following XML segment to the
system.serviceModel configuration section group. <diagnostics> <messageLogging
logMessagesAtTransportLevel=”true”/> </diagnostics>



Leave a Reply 0

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