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 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>

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. Dim client As ContosoService =
New ContosoService() client.Endpoint.Behaviors.Add(New CallbackDebugBehavior(True))

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

D.
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. Dim client As
ContosoService = New ContosoService() Dim behavior As SoapProcessingBehavior = New
SoapProcessingBe havior() behavior.ProcessMessages = True
client.Endpoint.Behaviors.Add(behavior)



Leave a Reply 0

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