Which two actions should you perform?

You develop a Windows Communication Foundation (WCF) service that employees use to
access bonus information. You define the following service contract. (Line numbers are
included for reference only.) 01 <ServiceContract(SessionMode:=SessionMode.Required)>
02 Public Interface IFinancialService 03 04 <OperationContract()> 05 Function Login( ByVal
employeeID As Integer, ByVal passwordHash As String) As String 06 07
<OperationContract()> 08 Function GetBonus(ByVal month As Integer) As Double 09 10
<OperationContract (IsTerminating:=True)> 11 Sub Logout() 12 13 End Interface Client
applications can invoke methods without logging in. You need to ensure that the client
applications invoke Login before invoking any other method. You also need to ensure that
client applications cannot consume the service after invoking Logout. Which two actions
should you perform? (Each correct answer presents part of the solution. Choose two.)

You develop a Windows Communication Foundation (WCF) service that employees use to
access bonus information. You define the following service contract. (Line numbers are
included for reference only.) 01 <ServiceContract(SessionMode:=SessionMode.Required)>
02 Public Interface IFinancialService 03 04 <OperationContract()> 05 Function Login( ByVal
employeeID As Integer, ByVal passwordHash As String) As String 06 07
<OperationContract()> 08 Function GetBonus(ByVal month As Integer) As Double 09 10
<OperationContract (IsTerminating:=True)> 11 Sub Logout() 12 13 End Interface Client
applications can invoke methods without logging in. You need to ensure that the client
applications invoke Login before invoking any other method. You also need to ensure that
client applications cannot consume the service after invoking Logout. Which two actions
should you perform? (Each correct answer presents part of the solution. Choose two.)

A.
Replace line 04 with the following code. <OperationContract(IsInitiating:=True,
IsTerminating:=True)>

B.
Replace line 07 with the following code. <OperationContract(IsInitiating:=False)>

C.
Replace line 10 with the following code. <OperationContract(IsInitiating:=False,
IsTerminating:=True)>

D.
Replace line 04 with the following code. <OperationContract(IsInitiating:=False)>



Leave a Reply 0

Your email address will not be published. Required fields are marked *