nerdexam
Microsoft

70-513 · Question #292

You are working with a Windows Communication Foundation (WCF) client application that has a generated proxy named SampleServiceProxy. When the client application is executing, in line 04 of the…

The correct answer is B. proxy = new SampleServiceProxy(). See the full explanation below for the reasoning.

Question

You are working with a Windows Communication Foundation (WCF) client application that has a generated proxy named SampleServiceProxy. When the client application is executing, in line 04 of the following code, the channel faults (Line numbers are included for reference only.) 01 SampleServiceProxy proxy = new SampleServiceProxy(); 02 try 03 { 04 proxy.ProcessInvoice(invoice); 05 } 06 catch 07 { 08 if(proxy.State == CommunicationState.Faulted) 09 { 10 ... 11 } 12 } 13 proxy.UpdateCustomer(customer); You need to return proxy to a state in which it can successfully execute the call in line 13. Which code segment should you use at line 10?

Options

  • Aproxy.Close();
  • Bproxy = new SampleServiceProxy();
  • Cproxy.Abort();
  • Dproxy.Open();

How the community answered

(30 responses)
  • A
    10% (3)
  • B
    83% (25)
  • C
    3% (1)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice