Developing Microsoft Azure and Web Services — Question 1
You are developing multiple web applications that will retrieve information for a Windows Communication Foundation (WCF) service
You need to intercept and inspect messages received by and sent from the WCF service.
Which three actions should you perform? Each correct answer presents part of the solution.
Answer options
- A. Create a class that inherits from the IDispatchMessageInspector interface.
- B. Implement the BeforeSendReply method.
- C. Implement the BeforeSendRequest method.
- D. Create a class that inherits from the IClientMessageInspector interface.
- E. Implement the AfterReceiveReply method.
- F. Implement the AfterReceiveRequest method.
Correct answer: A, B, F
Explanation
The correct actions involve creating a class that inherits from IDispatchMessageInspector to allow interception of messages sent to and from the service. Implementing the BeforeSendReply and AfterReceiveRequest methods is necessary for inspecting the reply before it's sent and the request after it's received. The other options involve methods related to client-side message inspection or are not relevant to the task at hand.