题目内容

A Windows Communication Foundation (WCF) service implements the following contract.(Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface IDataAccessService 03 { 04 [OperationContract] 05 void PutMessage(string message); 06 ... 07 [OperationContract] 08 [FaultContract(typeof(TimeoutFaultException))] 09 [FaultContract(typeof(FaultException))] 10 string SearchMessages(string search); 11 } The implementation of the SearchMessages method throws TimeoutFaultException exceptions for database timeouts.The implementation of the SearchMessages method also throws an Exception for any other issue it encounters while processing the request.These exceptions are received on the client side as generic FaultException exceptions. You need to implement the error handling code for SearchMessages and create a new channel on the client only if the channel faults.What should you do?()

A. Catch and handle both TimeoutFaultException and FaultException.
B. Catch both TimeoutFaultException and FaultException. Create a new channel in both cases.
Catch and handle TimeoutFaultException. Catch FaultException and create a new channel.
D. Catch and handle FaultException. Catch TimeoutFaultException and create a new channel.

查看答案
更多问题

铬铁矿条件

一个人除了有以出生年月计算的实际年龄外,还有()。

A. 生理年龄
B. 心理年龄
C. 生理年龄和心理年龄

泡夫成型时,要将准备好的烤盘上刷上一层薄薄的()。

A. 蛋液
B. 油脂
C. 胶液
D. 芝麻

纳税人营业额达到营业税起征点的,应按营业额全额计算征收营业税。

A. 正确
B. 错误

答案查题题库