You are developing a client application that consumes a Wind

题目
单选题
You are developing a client application that consumes a Windows Communication Foundation (WCF) service. You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service operation that takes no parameters and returns a string. The GetFlightCallback method must be called when the service operation returns.You create an instance of the client proxy with the following code:var client = new TranvelServiceClient( );You need to ensure that a callback is received when the GetFlight operation is called asynchronously. Which code segment should you use?()
A

client.BeginGetFlight(GetFlightCallback, null); client.GetFlight();

B

client.GetFlight(); client.BeginGetFlight(GetFlightCallback, null);

C

client.GetFlightCompleted += new EventHandler(GetFlightCallback); client.GetFlightAsync();

D

IAsyncResult asyncResult = client.BeginGetFlight(GetFlightCallback, client); client.EndGetFlight(asyncResult);

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are developing a client application that consumes a Windows Communication Foundation (WCF) service.The operation contract is as follows.[OperationContract][FaultContract(typeof(SalesFault))]string GetSales(string saleId);()The service configuration file contains the following line in the serviceBehaviors section.A divide-by-zero exception is not being handled by the service.You need to ensure that the exception is caught in the client application.Which type of exception should the client catch?()

A. TimeoutException

B. FaultException

C. DivideByZeroException

D. FaultException<SalesFault>


参考答案:B

第2题:

You want to debug the Windows Communication Foundation (WCF) client and server interaction through message and application tracing.You need to correlate traces generated on the client and the server. Which XML segment should you add to the system.diagnostics configuration element in the client and server application configuration file?()

A.

B.

C.

D.


参考答案:A

第3题:

You are developing a Windows Communication Foundation (WCF) service.You enable message logging, trace listeners, activity propagation, and tracing on the trace sources.You have the following code segment in the client application. (Line numbers are included for reference only.)01 Guid multiCallActivityId = Guid.NewGuid();02 TraceSource ts = new TraceSource("Multicall");03 Trace.CorrelationManager.ActivityId = multiCallActivityId;04You encounter errors when your client application consumes the service.You need to ensure that your client application can correlate tracing information with the service.Which code segment should you add at line 04?()

A.

B.

C.

D.


参考答案:C

第4题:

Your company has 1,000 client computers that run Windows XP Professional x64.   You are planning to deploy Windows 7 Enterprise x64. The company uses an application that is incompatible with Windows 7 Enterprise x64.   You have the following requirements:   Provide all users with access to the application.   Deploy and manage the application by using a centralized solution.  You need to design a solution that meets the requirements.   What should you do?()

  • A、 Install the application on all client computers by using Group Policy,and then use the Compatibility tab.
  • B、 Install the Microsoft Enterprise Desktop Virtualization(MED-V) v2 package on each client computer.
  • C、 Install the Microsoft Application Virtualization(App-V) client on each client computer,and stream the application byusing App-V.
  • D、 Install the Microsoft Application Virtualization(App-V) client on each client computer,and run the application in offline mode.

正确答案:B

第5题:

A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service. You must ensure that the client application can interact with the WCF service. What should you do? ()

  • A、 On the OperationContractAttribute, set the AsyncPattern property value to True.
  • B、 On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client. For interactive and self-paced preparation of exam 70-513, try our practice exams. Practice exams also include self assessment and reporting features!
  • C、 On the client, create a proxy derived from DuplexClientBase(Of TChannel).
  • D、 On the client, use GetCallbackChannel(Of T).

正确答案:C

第6题:

You are creating an application that consumes a Windows Communication Foundation (WCF) service. The service implements the IService contract. The client application contains the CallbackHandler class, which implements IServiceCallback.You need to ensure that a client proxy is created that can communicate with the service over a duplex channel.Which code segment should you use?()

A.

B.

C.

D.


参考答案:B

第7题:

You work as an application developer at Certkiller .com. Certkiller .com has been hired by a small local private school to develop a class library that will be used in an application named ManageAttendance for the purpose of managing student records.You are responsible for developing this class library. Certkiller .com has instructed you to create a collection in the application to store learners’ results. The school has informed you that they currently only have seven learners, but that this value will triple in the following year. Due to the limited resources, you need to ensure that the collection you create consumes a minimum amount of resources. What should you use to create the collection?()

  • A、 The HybridDictionary collection class.
  • B、 The HashTable collection class.
  • C、 The ListDictionary collection class.
  • D、 The StringCollection collection class.

正确答案:A

第8题:

You are developing a Windows Communication Foundation (WCF) service. Client applications require reliable sessions to access the service.Users report that they receive ServerTooBusyException errors when their client application tries to establish a session. You need to ensure that the service can handle a minimum of 30 client connection requests.Which ReliableSessionBindingElement property should you configure?()

A. MaxRetryCount

B. MaxTransferWindowSize

C. MaxPendingChannels

D. InactivityTimeout


参考答案:C

第9题:

You are creating a Windows Communication Foundation (WCF) service. The service endpoints change frequently. On the service, you add a new ServiceDiscoveryBehavior to the Behaviors collection of the ServiceHost Description property. You need to ensure that client applications can communicate with the service and discover changes to the service endpoints. What should you do?()

  • A、Add a new ServiceDiscoveryBehavior to the Behaviors collection in the client application.
  • B、Add a new AnnouncementClient to the Behaviors collection in the client application.
  • C、Use the FindCriteria class and the UdpDiscoveryEndpoint class to set up the binding in the client application.
  • D、Use the DiscoveryProxy class and the EndpointDiscoveryMetadata class to set up the binding in the client application.

正确答案:C

第10题:

You are developing a Windows Communication Foundation (WCF) client application. The client application contains the following code. [ServiceContract] public interface ISocialStatus { [OperationContract] [WebInvoke(UriTemplate = "/statuses/update.xml?status-{text}")] void UpdateStatus(string text); } public class SocialClient : ClientBase, ISocialStatus { ... } The configuration file contains the following lines. binding="webHttpBinding" contract="SocialApp.ISocialStatus" bindingConfiguration="BindingConfig" /> You need to ensure that the service is consumed. Which code segment should you use?()

  • A、var client = new SocialClient("SocialClient"); client.Endpoint.Behaviors.Add(new WebHttpBehavior());
  • B、var client = new SocialClient("SocialClient"); client.Endpoint.Behaviors.Add(new WebScriptEnablingBehovior());
  • C、var client = new SocialClient("POST"); client.Endpoint.Behaviors.Add(new WebHttpBehovior());
  • D、var client = new SocialClient("POST"); client.Endpoint.Behaviors.Add(new WebScriptEnablingBehavior());

正确答案:A

更多相关问题