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

You are creating an XML Web service named ViewOrders that is available to customers over the Internet. ViewOrders exposes a Web method named ViewShippingDetail that requires additional security. You decide to use generic role-based security to secure ViewShippingDetail.You need to write code to ensure that once the caller is authenticated, a user identity named Generic is created. This user identity has membership in a group named Shipping to allow access to ViewShippingDetail .Which code segment should you use?

2021-12-25

A.Dim myldentity As IIdentity = New GenericIdentity("Generic”, "Custom")Dim Roles As String() = {"Shipping"}Dim myPrincipal = New GenericPrincipal(myldentity, Roles)ir.yldentity = Windowsldentity. Get Current

B.Dim myldentity As Genericldentity = New_Genericldentity("Generic", "Custom")Dim Roles As String () = {"Shipping"}Dim myPrincipal = New GenericPrincipal(myldentity,_ Roles) Thread.CurrentPrincipal = myPrincipal

C.Dim myldentity As Ildentity = New_Genericldentity("Generic", "Shipping")Dim myPrincipal As 工Principal = New_WindowsPrincipal(myldentity)Threa

D.CurrentPrincipal = myPrincipalD.Dim myGenericIdentity As Ildentity = New_Genericldentity(”Generic", "Custom")Dim myldentity As Windowsldentity = myGenericIdentity Dim Roles As String() = {"Shipping"}Dim myPrincipal = New GenericPrincipal(myldentity,_Roles)Windowsldentity.Impersonate(myldentity.Token)

题目答案

试卷相关题目

最新试卷
热门试卷

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

去 App Store 免费下载 iOS 客户端