单选题You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service contract is defined as follows. (Line numbers are included for reference only) 01 [ServiceContract] 02 public interface IDat

题目
单选题
You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. 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 class UpdateService : IDataUpdate 10 { 11 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = false)] 12 public void Update(string accountNumber, double amount) 13 { 14 ... 15 } 16 } 17 You need to ensure that the service is invoked within the transaction. What should you do?()
A

Replace line 01 with the following code [ServiceContract(SessionMode = SessionMode.NotAllowed)]

B

Replace line 01 with the following code [ServiceContract(SessionMode = SessionMode.Required)]

C

Call the Invoke method of the form and supply a delegate.

D

Call the BeginInvoke method of the form and supply a delegate.


相似考题
更多“单选题You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service contract is defined as follows. (Line numbers are included for reference only) 01 [ServiceContract] 02 public interface IDat”相关问题
  • 第1题:

    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

  • 第2题:

    You develop a Windows Communication Foundation (WCF) service to generate reports. Client applications call the service to initiate report generation but do not wait for the reports to be generated. The service does not provide any status to the client applications. The service class is defined as follows. (Line numbers are included for reference only.)01 [ServiceContract]02 public class ReportGeneratorService03 {04 ...05 private int GenerateReports(int clientID)06 {07 ...08 return 0;09 }10 }You need to ensure that client applications can initiate reports without waiting for status.Which two actions should you perform (Each correct answer presents part of the solution. Choose two.) ()。

    A. Insert the following code at line 04. [OperationContract(IsOneWay=true)]

    B. Insert the following code at line 04. [OperationContract(AsyncPattern=false)]

    C. At line 05, change the GenerateReports method from private to public.

    D. Remove line 08. At line 05, change the return type of GenerateReports method to void.


    参考答案:A, D

  • 第3题:

    A Windows Communication Foundation (WCF) client uses the following service contract.(Line numbers are included for reference only.)01 [ServiceContract]02 public interface IService03 {04 [OperationContract]05 string Operation1();06 [OperationContract]07 string Operation2();08 }You need to ensure that all calls to Operation1 and Operation2 from the client are encrypted and signed. What should you do?()

    A. Set the ProtectionLevel property in line 01 to EncryptAndSign.

    B. Set the ProtectionLevel property in line 04 and line 06 to Sign.

    C. Add a SecurityCriticalAttribute ror each operation.

    D. Add a SecunitySafeCriticalAttribute for each operation.


    参考答案:A

  • 第4题:

    A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. The service is implemented in a class named DataAccessService which implements the IDataAccess interface and also is defined in the MyApplication namespace. The hosting code is as follows. (Line numbers are included for reference only.)01 static void Main(string[] args)02 {03 ServiceHost host;04 ...05 host.Open();06 Console.ReadLine();07 host.Close();08 }You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.Which line of code should you insert at line 04?()

    A. host = new ServiceHost("MyApplication.DataAccessService");

    B. host = new ServiceHost("MyApplication.DataAccess");

    C. host = new ServiceHost(typeof(IDataAccess));

    D. host = new ServiceHost(typeof(DataAccessService));


    参考答案:D

  • 第5题:

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

    正确答案:A

  • 第6题:

    You are developing a Windows Communication Foundation (WCF) service to provide an in-memory cache for many Web applications.The service contract is defined as follows. (Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface IDataCache 03 { 04 ... 05 }06 07 08 public class DataCache : IDataCache 09 { 10 ... 11 } You need to ensure that all users share the cache. Which code segment should you insert at line 07?()

    • A、[ServiceBehavior(TransactionIsolationLevel = IsolationLevel.RepeatableRead)]
    • B、[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    • C、[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
    • D、[ServiceBehavior(TransactionIsolationLevel = IsolationLevel.ReadComitted)]

    正确答案:B

  • 第7题:

    A Windows Communication Foundation (WCF) solution exposes the following service over a TCP binding.(Line numbers are included for reference only.) 01 [ServiceContract] 02 [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] 03 public class DataAccessService 04 { 05 [OperationContract] 06 public void PutMessage(string message) 07 { 08 MessageDatabase.PutMessage(message); 09 } 10 [OperationContract] 11 pubic string[] SearchMessages(string search) 12 { 13 return MessageDatabase.SearchMessages(search); 14 } 15 } MessageDatabase supports a limited number of concurrent executions of its methods. You need to change the service to allow up to the maximum number of executions of the methods of MessageDatabase. This should be implemented without preventing customers from connecting to the service. What should you do?()

    • A、Change the service behavior as follows. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)]
    • B、Change the service behavior as follows. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, InstanceContextMode = InstanceContextMode.PerSession)]
    • C、Add a throttling behavior to the service, and configure the maxConcurrentCalls.
    • D、Add a throttling behavior to the service, and configure the maxConcurrentSessions.

    正确答案:C

  • 第8题:

    You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. 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 class UpdateService : IDataUpdate 10 { 11 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = false)] 12 public void Update(string accountNumber, double amount) 13 { 14 ... 15 } 16 } 17 You need to ensure that the service is invoked within the transaction. What should you do?()

    • A、Replace line 01 with the following code [ServiceContract(SessionMode = SessionMode.NotAllowed)]
    • B、Replace line 01 with the following code [ServiceContract(SessionMode = SessionMode.Required)]
    • C、Call the Invoke method of the form and supply a delegate.
    • D、Call the BeginInvoke method of the form and supply a delegate.

    正确答案:B

  • 第9题:

    单选题
    A Windows Communication Foundation (WCF) solution exposes the following service over a TCP binding.(Line numbers are included for reference only.) 01 [ServiceContract] 02 [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] 03 public class DataAccessService 04 { 05 [OperationContract] 06 public void PutMessage(string message) 07 { 08 MessageDatabase.PutMessage(message); 09 } 10 [OperationContract] 11 pubic string[] SearchMessages(string search) 12 { 13 return MessageDatabase.SearchMessages(search); 14 } 15 } MessageDatabase supports a limited number of concurrent executions of its methods. You need to change the service to allow up to the maximum number of executions of the methods of MessageDatabase. This should be implemented without preventing customers from connecting to the service. What should you do?()
    A

    Change the service behavior as follows. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)]

    B

    Change the service behavior as follows. [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, InstanceContextMode = InstanceContextMode.PerSession)]

    C

    Add a throttling behavior to the service, and configure the maxConcurrentCalls.

    D

    Add a throttling behavior to the service, and configure the maxConcurrentSessions.


    正确答案: C
    解析: 暂无解析

  • 第10题:

    单选题
    A Windows Communication Foundation (WCF) client uses the following service contract.(Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface IService 03 { 04 [OperationContract] 05 string Operation1( ); 06 [OperationContract] 07 string Operation2( ); 08 } You need to ensure that all calls to Operation1 and Operation2 from the client are encrypted and signed. What should you do?()
    A

    Set the ProtectionLevel property in line 01 to EncryptAndSign.

    B

    Set the ProtectionLevel property in line 04 and line 06 to Sign.

    C

    Add a SecurityCriticalAttribute ror each operation.

    D

    Add a SecunitySafeCriticalAttribute for each operation.


    正确答案: A
    解析: 暂无解析

  • 第11题:

    单选题
    You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. 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 public class UpdateService : IDataUpdate 11 { 12 13 [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete=true)] 14 public void Update(string accountNumber, double amount) 15 { 16 try 17 { 18 ... 19 } 20 catch(Exception ex) 21 { 22 ... 23 } 24 } 25 }The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client application’s transaction if one is available. Otherwise it must use its own transaction.You need to ensure that the service operation is always executed within a transaction. What should you do?()
    A

    Replace line 05 with the following code. [TransactionFlow(TransactionFlowOption.NotAllowed)]

    B

    Replace line 13 with the following code. [OperationBehavior(TransactionScopeRequired=false, TransactionAutoComplete=true)]

    C

    Replace line 05 with the following code. [TransactionFlow(TransactionFlowOption.Allowed)]

    D

    Replace line 13 with the following code. [OperationBehavior(TransactionScopeRequired=false, TransactionAutoComplete=false)]


    正确答案: C
    解析: 暂无解析

  • 第12题:

    单选题
    You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 03 public Class LibraryService 04 { 05 public Book GetBookByTitle(string title) 06 { 07 ... 08 } 09 10 [WebGet(UriTemplate = "Book/{id}")] 11 public Book GetBookById(string id) 12 { 13 ... 14 } 15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()
    A

    [WebGet(UriTemplate = Book/{title})]

    B

    [WebGet(UriTemplate = BookByTitle/{title})]

    C

    [WebGet(UriTemplate = Book/{titleToSearch})]

    D

    [WebGet(UriTemplate = {titleToSearch})]


    正确答案: A
    解析: 暂无解析

  • 第13题:

    You are developing a Windows Communication Foundation (WCF) service to replace an existing ASMX Web service.The WCF service contains the following code segment. (Line numbers are included for reference only.)

    01 [ServiceContract()]

    02

    03 public interface IEmployeeService

    04 {

    05 [OperationContract()]

    06 EmployeeInfo GetEmployeeInfo(int employeeID);

    07

    08 }

    09

    10 public class EmployeeService : IEmployeeService

    11 {

    12

    13 public EmployeeInfo GetEmployeeInfo(int employeeID)

    14 {

    15 ...

    16 }

    17 }

    18

    19

    20 public class EmployeeInfo

    21 {

    22 ...

    23 public int EmployeeID { get; set; }

    24 public string FirstName { get; set; }

    25 public string LastName { get; set; }

    26

    27 }The existing Web service returns the EmployeelD as an attribute of the Employeelnfo element in the response XML.You need to ensure that applications can consume the service without code changes in the client.

    What should you do?()


    参考答案:B

  • 第14题:

    Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.The section of the configuration file is as follows. (Line numbers are included for reference only.)01 02 03 04 05 06 ...0708 09 10 11 You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupService.svc?wsdl.What should you do?()

    A.

    B.

    C.

    D.


    参考答案:C

  • 第15题:

    A Windows Communication Foundation (WCF) service implements the following contract. [ServiceContract] public interface IHelloService { [OperationContract(WebGet(UriTemplate="hello?name={name}"))]

    A.

    B.

    C.

    D.


    参考答案:B

  • 第16题:

    You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. 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 public class UpdateService : IDataUpdate 11 { 12 13 [OperationBehavior(TransactionScopeRequired=true, TransactionAutoComplete=true)] 14 public void Update(string accountNumber, double amount) 15 { 16 try 17 { 18 ... 19 } 20 catch(Exception ex) 21 { 22 ... 23 } 24 } 25 }The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client application’s transaction if one is available. Otherwise it must use its own transaction.You need to ensure that the service operation is always executed within a transaction. What should you do?()

    • A、Replace line 05 with the following code. [TransactionFlow(TransactionFlowOption.NotAllowed)]
    • B、Replace line 13 with the following code. [OperationBehavior(TransactionScopeRequired=false, TransactionAutoComplete=true)]
    • C、Replace line 05 with the following code. [TransactionFlow(TransactionFlowOption.Allowed)]
    • D、Replace line 13 with the following code. [OperationBehavior(TransactionScopeRequired=false, TransactionAutoComplete=false)]

    正确答案:C

  • 第17题:

    A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. The service is implemented in a class named DataAccessService which implements the IDataAccess interface and also is defined in the MyApplication namespace. The hosting code is as follows. (Line numbers are included for reference only.) 01 static void Main(string[] args) 02 { 03 ServiceHost host; 04 ... 05 host.Open( ); 06 Console.ReadLine( ); 07 host.Close( ); 08 } You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.Which line of code should you insert at line 04?()

    • A、host = new ServiceHost("MyApplication.DataAccessService");
    • B、host = new ServiceHost("MyApplication.DataAccess");
    • C、host = new ServiceHost(typeof(IDataAccess));
    • D、host = new ServiceHost(typeof(DataAccessService));

    正确答案:D

  • 第18题:

    You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 03 public Class LibraryService 04 { 05 public Book GetBookByTitle(string title) 06 { 07 ... 08 } 09 10 [WebGet(UriTemplate = "Book/{id}")] 11 public Book GetBookById(string id) 12 { 13 ... 14 } 15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()

    • A、[WebGet(UriTemplate = "Book/{title}")]
    • B、[WebGet(UriTemplate = "BookByTitle/{title}")]
    • C、[WebGet(UriTemplate = "Book/{titleToSearch}")]
    • D、[WebGet(UriTemplate = "{titleToSearch}")]

    正确答案:B

  • 第19题:

    You develop a Windows Communication Foundation (WCF) service to generate reports. Client applications call the service to initiate report generation but do not wait for the reports to be generated. The service does not provide any status to the client applications. The service class is defined as follows. (Line numbers are included for reference only.) 01 [ServiceContract] 02 public class ReportGeneratorService 03 { 04 ... 05 private int GenerateReports(int clientID) 06 { 07 ... 08 return 0; 09 } 10 } You need to ensure that client applications can initiate reports without waiting for status. Which two actions should you perform (Each correct answer presents part of the solution. Choose two.) ()。

    • A、Insert the following code at line 04. [OperationContract(IsOneWay=true)]
    • B、Insert the following code at line 04. [OperationContract(AsyncPattern=false)]
    • C、At line 05, change the GenerateReports method from private to public.
    • D、Remove line 08. At line 05, change the return type of GenerateReports method to void.

    正确答案:A,D

  • 第20题:

    单选题
    You are developing a Windows Communication Foundation (WCF) service to replace an existing ASMX Web service.The WCF service contains the following code segment. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 03 public interface IEmployeeService 04 { 05 [OperationContract( )] 06 EmployeeInfo GetEmployeeInfo(int employeeID); 07 08 } 09 10 public class EmployeeService : IEmployeeService 11 { 12 13 public EmployeeInfo GetEmployeeInfo(int employeeID) 14 { 15 ... 16 } 17 } 18 19 20 public class EmployeeInfo 21 { 22 ... 23 public int EmployeeID { get; set; } 24 public string FirstName { get; set; } 25 public string LastName { get; set; } 26 27 }The existing Web service returns the EmployeelD as an attribute of the Employeelnfo element in the response XML.You need to ensure that applications can consume the service without code changes in the client. What should you do?()
    A

    Insert the following code at line 02. [DataContractFormat()] Insert the following code at line 22. [DataMember()]

    B

    Insert the following code at line 02. [XmlSerializerFormat()] Insert the following code at line 22. [XmlAtttibute()]

    C

    Insert the following code at line 09. [XmlSerializerFormat()] Insert the following code at line 22. [XmlAttribute()]

    D

    Insert the following code at line 19. [DataContractFormat()] Insert the following code at line 22. [DataMember()]


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. The service is implemented in a class named DataAccessService which implements the IDataAccess interface and also is defined in the MyApplication namespace. The hosting code is as follows. (Line numbers are included for reference only.) 01 static void Main(string[] args) 02 { 03 ServiceHost host; 04 ... 05 host.Open( ); 06 Console.ReadLine( ); 07 host.Close( ); 08 } You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host.Which line of code should you insert at line 04?()
    A

    host = new ServiceHost(MyApplication.DataAccessService);

    B

    host = new ServiceHost(MyApplication.DataAccess);

    C

    host = new ServiceHost(typeof(IDataAccess));

    D

    host = new ServiceHost(typeof(DataAccessService));


    正确答案: B
    解析: 暂无解析

  • 第22题:

    单选题
    You are developing a Windows Communication Foundation (WCF) service to provide an in-memory cache for many Web applications.The service contract is defined as follows. (Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface IDataCache 03 { 04 ... 05 }06 07 08 public class DataCache : IDataCache 09 { 10 ... 11 } You need to ensure that all users share the cache. Which code segment should you insert at line 07?()
    A

    [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.RepeatableRead)]

    B

    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]

    C

    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]

    D

    [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.ReadComitted)]


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    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)]


    正确答案: A
    解析: 暂无解析

  • 第24题:

    单选题
    You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. 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 class UpdateService : IDataUpdate 10 { 11 [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = false)] 12 public void Update(string accountNumber, double amount) 13 { 14 ... 15 } 16 } 17 You need to ensure that the service is invoked within the transaction. What should you do?()
    A

    Replace line 01 with the following code [ServiceContract(SessionMode = SessionMode.NotAllowed)]

    B

    Replace line 01 with the following code [ServiceContract(SessionMode = SessionMode.Required)]

    C

    Call the Invoke method of the form and supply a delegate.

    D

    Call the BeginInvoke method of the form and supply a delegate.


    正确答案: B
    解析: 暂无解析