单项选择题
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")]
相关考题
-
单项选择题
您目前正在审查由其他开发人员创建的应用程序的过程中。您正在检查的应用程序包括声明一个名为 EmployeeList,其中存储雇员对象的集合。如下所示:公共类 EmployeeList: Enumerator, IEnumerable{/ / 类实现}您需要的能力来循环访问 EmployeeList,最小的开发工作。你应该做什么?()
A.利用switch语句
B.利用dowhile语句
C.利用foreach语句
D.使用if语句 -
多项选择题
YouworkasanapplicationdeveloperatCer-Tech.com.YouareintheprocessofcreatinganapplicationforCert-Tech.com’sHumanResourcesdepartmentthattracksemployeebenefitsYouhavetostorecurrentemployeedatawithoutrecompilingtheapplication.Youelecttostorethisemployeedataasacustomsectionintheapplicationconfigurationfile.Therelevantportionoftheapplicationconfigurationfileisshowninthefollowingexhibit:Whatshouldyoudo?()
A. Create a custom section handler class that inherits the ConfigurationSection interface
B. Add a section element to the EmployeeSection element of the application configuration file
C. Create a custom section handler class that implements the IConfigurationSectionHandler interface.
D. Add an EmployeeSection element to the configSections element of the application confguration file
E. Create a custom section handler class that implements the IApplicationSettingsProvider interface
F. Add a section element to the configSections element of the application configuration file -
单项选择题
Whicheventwouldyouusetorunamethodimmediatelyafterserializationoccurs?()
A. OnSerializing
B. OnDeserializing
C. OnSerialized
D. OnDeserialized
