搜题
用户您好, 请在下方输入框内搜索其它题目:
搜题
题目内容 (请给出正确答案)
提问人:网友 发布时间:
【单选题】

You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. The client applications call the service in a transaction. The service contract is defined as follows. (Line numbers are included for reference only.)<br /> 01 [ServiceContract]<br /> 02 public interface IDataUpdate<br /> 03 {<br /> 04 [OperationContract]<br /> 05 [TransactionFlow(TransactionFlowOption.Mandatory)]<br /> 06 void Update(string accountNumber, double amount);<br /> 07 }<br /> 08<br /> 09 ...<br /> 10 class UpdateService : IDataUpdate<br /> 11 {<br /> 12 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]13 public void Update(string accountNumber, double amount)<br /> 14 {<br /> 15 try<br /> 16 {<br /> 17 ...<br /> 18 }<br /> 19 catch(Exception ex)<br /> 20 {<br /> 21 WriteErrorLog(ex);<br /> 22 ...<br /> 23 }<br /> 24 }<br /> 25 }<br /> 26Customers report that the transaction completes successfully even if the Update method t

A、Insert the following line at line 22: throw;

B、Insert the following line at line 09: [ServiceBehavior(TransactionAutoCompleteOnSessionClose=false)]

C、Replace line 12 with the following line: [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete= false)]

D、Insert the following line at line 09.: [ServiceBehavior(TransactionAutoCompleteOnSessionClose=true)]

更多“ You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. The client applications call the service in a transaction. The service contract is defined as follows. (Line numbers are included for reference only.)<br /> 01 [ServiceContract]<br /> 02 public interface IDataUpdate<br /> 03 {<br /> 04 [OperationContract]<br /> 05 [TransactionFlow(TransactionFlowOption.Mandatory)]<br /> 06 void Update(string accountNumber, double amount);<br /> 07 }<br /> 08<br /> 09 ...<br /> 10 class UpdateService : IDataUpdate<br /> 11 {<br /> 12 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]13 public void Update(string accountNumber, double amount)<br /> 14 {<br /> 15 try<br /> 16 {<br /> 17 ...<br /> 18 }<br /> 19 catch(Exception ex)<br /> 20 {<br /> 21 WriteErrorLog(ex);<br /> 22 ...<br /> 23 }<br /> 24 }<br /> 25 }<br /> 26Customers report that the transaction completes successfully even if the Update method t”相关的问题
第7题

A、A. Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.  B、B. Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.  C、C. Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.  D、D. Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.  

点击查看答案
客服
TOP

请使用微信扫码支付

订单号:
遇到问题请联系在线客服