nerdexam
Microsoft

70-513 · Question #64

70-513 Question #64: Real Exam Question with Answer & Explanation

Sign in or unlock 70-513 to reveal the answer and full explanation for question #64. The question stem and answer options stay visible for context.

Question

A Windows Communication Foundation (WCF) solution uses the following contracts. (Line numbers are included for reference only.) 01 [ServiceContract(CallbackContract=typeof(INameService))] 02 public interface IGreetingService 03 { 04 [OperationContract] 05 string GetMessage(); 06 } 07 08 [ServiceContract] 09 public interface INameService 10 { 11 [OperationContract] 12 string GetName(); 13 } When the client calls GetMessage on the service interface, the service calls GetName on the client callback. In the client, the class NameService implements the callback contract. The client channel is created as follows: 22 InstanceContext callbackContext = new InstanceContext(new NameService("client")); 23 ... 24 ... 25 DuplexChannelFactory<IGreetingService> factory = new DuplexChannelFactory<IGreetingService>( typeof(NameService), binding, address); 26 IGreetingService greetingService = factory.CreateChannel(); You need to ensure that the service callback is processed by the instance of NameService. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Options

  • AChange line 25 to the following code segment:
  • BChange line 26 to the following code segment:
  • CAdd the following code segment after line 26:
  • DAdd the following code segment after line 26:

Unlock 70-513 to see the answer

You've previewed enough free 70-513 questions. Unlock 70-513 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-513 Practice