微软MCAD 70-310 实战百题
题目内容

You are creating an XML Web service named Accountinglnformation for your company. AccountInformation exposed a Web method named Get- AccountBalance that returns the account balance as a string. You must limit access to GetAc count Bala nee to users who have credentials stored in your Microsoft SQL Server database.You need to design GetAccountBalance to receive encrypted user credentials by using two custom fields named Username and Password in the SOAP header. To accomplish this goal, you must write the code for GetAccountBalance.Which code segment should you use?

2021-12-25

A.Public Class AuthenticateUser Inherits SoapHeader Public Username As StringPublic Password As String End Class'In the accountInformation class add this code: Public authenticateUserHeader As AuthenticateUser Public Function GetAccountBalance () As String If (authenticateUserHeader Is "") Then Return "Please supply Credentials."Else'Code to authenticate the user and return 'the account balance goes here.End IfEnd Function

B.Public Class AuthenticateUser Public Username As String Public Password As String End Class'In the accountInformation class add this code: Public authenticateUserHeader As AuthenticateUser Public Function GetAccountBalnce() as String If (authenticateUserHeader Is nn) Then Return "Please supply Credentials."Else'Code to authenticate the user and return 'the account balance goes here.End IfEnd Function

C.Public Class AuthenticateUser Inherits SoapHeader Public Username As String Public Password As String End Class'In the accountlnformation class add this code: Public authenticateUserHeader As AuthenticateUser Public Function GetAccountBalance() As String If (authenticateUserHeader Is Then Return "Please supply credentials."Else'Code to authenticate the user and return 'the account balance goes here.End IfEnd Function

D.Public Class AuthenticateUser Public Username As String Public Password As String End Class• In the accountlnformation class add this code: Public authenticateUserHeader As AuthenticateUser Public Function GetAccountBalnce() As String If (authenticateUserHeader I日Then Return "Please supply Credentials."Else'Code to authenticate the user and return 'the account balance goes her

E.End If End Function

题目答案

试卷相关题目

最新试卷
热门试卷

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端