欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > 微软认证考试 > MCPD > MCPD(70-536)

单项选择题

You are developing an application that uses role-based security. The prinicipal policy of the application domain is configured during startup with the following code:AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);  You need to restrict access to one of the methods in your application so that only members of the local Administrators group can call the method. Which attribute should you place on the method?()

    A. [PrincipalPermission (SecurityAction.Demand, Name = @"BUILTIN\Administrators")]
    B. [PrincipalPermission (SecurityAction.Demand, Role = @"BUILTIN\Administrators")]
    C. [PrincipalPermission (SecurityAction.Assert, Name = @"BUILTIN\Administrators")]
    D. [PrincipalPermission (SecurityAction.Assert, Role = @"BUILTIN\Administrators")]

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题