当前位置:MCTS(70-513)题库

问题:

[单选]

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.)
01 [ServiceContract]
02 public interface IDataUpdate
03 {
04 [OperationContract]
05 [TransactionFlow(TransactionFlowOption.Mandatory)]
06 void Update(string accountNumber, double amount);
07 }
08
09 ...
10 class UpdateService : IDataUpdate
11 {
12 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]13 public void Update(string accountNumber, double amount)
14 {
15 try
16 {
17 ...
18 }
19 catch(Exception ex)
20 {
21 WriteErrorLog(ex);
22 ...
23 }
24 }
25 }
26Customers report that the transaction completes successfully even if the Update method throws an exception.You need to ensure that the transaction is aborted if the Update method is not successful.
What should you do? ()

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)]

our company has four DNS servers that run windows 2008. Each server has a static ip address. You need to prevent dhcp from assigning the addresses of the DNS servers to DHCP clients. What should you do?() Create a new scope for the DNS servers.。 Create a reservation for the DHCP serve.。 Configure the 005 name servers scope option.。 Configure an exclusion that contains the ip addresses of the four DNS servers.。 当代科学技术的基础主要包括() 材料。 能源。 信息。 科学原理。 您是Company公司的开发者,你正在创建一个名为Company1的程序集,此程序集包含一个公共的方法。一个全局的缓存包含一个名为Company2的程序集。如果您必须确定那个public方法只能在Company2中被调用。则您应该使用下面的哪个权限类?() GacIdentityPermission(从全局缓冲中得到的文件的权限)。 PublisherIdentityPermission(标识开发商的权限)。 DataProtectionPermission(控制访问加密数据的权限)。 StrongNameIdentityPermission(为强名称定义标识权限)。 第()类医疗器械实行产品备案管理。 为什么说山羊不是酿成沙尘暴的罪魁祸首?

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.)
01 [ServiceContract]
02 public interface IDataUpdate
03 {
04 [OperationContract]
05 [TransactionFlow(TransactionFlowOption.Mandatory)]
06 void Update(string accountNumber, double amount);
07 }
08
09 ...
10 class UpdateService : IDataUpdate
11 {
12 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]13 public void Update(string accountNumber, double amount)
14 {
15 try
16 {
17 ...
18 }
19 catch(Exception ex)
20 {
21 WriteErrorLog(ex);
22 ...
23 }
24 }
25 }
26Customers report that the transaction completes successfully even if the Update method throws an exception.You need to ensure that the transaction is aborted if the Update method is not successful.
What should you do? ()

参考答案:

  参考解析

本题暂无解析

在线 客服