单项选择题
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>
相关考题
-
单项选择题
You are debugging a Windows Communication Foundation (WCF) service. The service uses signed and encrypted messages.You need to configure logging so that you can read the contents of the messages. What should you do?()
A. Set maxSizeMessagesToLog to 10
B. Set logMessageAtServiceLevel to true.
C. Set maxMessagesToLog to 10.
D. Set logMessageAtTransportLevel to true. -
单项选择题
You have a Windows Communication Foundation (WCF) service that accepts the following message contract.[MessageContract(WrapperNamespace="http://www.movies.com", ProtectionLevel=ProtectionLevel.None)] public class Ticket{ [MessageBodyMember(Namespace="http://www.movietheater.com", Order=1)] public DateTime ShowTime = DateTime.Now; [MessageBodyMember(Namespace="http://www.movietheater.com")] public string ReservationName = "Smith"; [MessageBodyMember(Namespace="http://www.movietheater.com")] public int NumberOfSeats = 0;} You need to ensure that the client sends a SOAP body that is accepted by the service.()
A.
B.
C.
D. -
单项选择题
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.
