black

MCTS(70-513)

登录

单项选择题

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?()

A. proxy.Close();
B. proxy = new SampleServiceProxy();
C. proxy.Abort();
D. proxy.Open();

相关考题

单项选择题 You are building a client for a Windows Communication Foundation (WCF) service. You need to create a proxy to consume this service. Which class should you use?()

单项选择题 You are building a client for a Windows Communication Foundation (WCF) service. You need to create a proxy to consume this service. Which class should you use?()

单项选择题 A Windows Communication Foundation (WCF) service implements the following contract. [ServiceContract] public interface IHelloService { [OperationContract(WebGet(UriTemplate="hello?name={name}"))] string SayHello(string name);}The implementation is as follows:public class HelloService: IHelloService { public string SayHello(string name) { return "Hello " + name; }}The service is self-hosted, and the hosting code is as follows:WebServiceHost svcHost = CreateHost();svcHost.Open();Console.ReadLine();svcHost.Close();You need to implement CreateHost so that the service has a single endpoint hosted at http://localhost:8000/HelloService.Which code segment should you use?()

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064