You create a Windows Communication Foundation client application by using Microsoft .NET Framework 3.5.
The client application communicates with an existing Web service that requires custom HTTP headers.
You need to ensure that all messages sent to the service include the headers.
Which two tasks should you perform? (Each correct answer presents part of the solution. Choose two.)
A.
Create a message inspector. Insert the custom headers by using the IClientMessageInspector.AfterReceiveReply method.
B.
Create a message inspector. Insert the custom headers by using the IClientMessageInspector.BeforeSendRequest method.
C.
Create a custom endpoint behavior. Add the message inspector by using the IEndpointBehavior.ApplyClientBehavior method.
D.
Create a custom endpoint behavior. Add the message inspector by using the IEndpointBehavior.AddBindingParameters method.
Explanation:
http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iclientmessageinspector.beforesendrequest.aspxhttp://msdn.microsoft.com/en-us/library/system.servicemodel.description.iendpointbehavior.applyclientbehavior.aspx