单项选择题
You are creating a new security policy for an application domain. You write the following lines of code.
PolicyLevel policy = PolicyLevel.CreateAppDomainLevel();
PolicyStatement noTrustStatement =
new PolicyStatement(
policy.GetNamedPermissionSet("Nothing"));
PolicyStatement fullTrustStatement =
new PolicyStatement(
policy.GetNamedPermissionSet("FullTrust"));
You need to arrange code groups for the policy so that loaded assemblies default to the Nothing permission set. If the assembly originates from a trusted zone, the security policy must grant the assembly the FullTrust permission set.
Which code segment should you use?()
A.A
B.B
C.C
D.D
相关考题
-
单项选择题
您正在创建一个可列出远程计算机上的进程的应用程序。该应用程序需要一个执行以下任务的方法: 以名为strComputer 的字符串参数的形式接受远程计算机名称。 返回一个包含该计算机上正在运行的所有进程的名称的ArrayList 对象。 您需要编写一个代码段,该代码段检索远程计算机上正在运行的每个进程的名称,并将名称添加到ArrayList对象。 您应该使用哪个代码段?()
A.
B.
C.
D. -
单项选择题
假设您在开发一个方法,它把使用三重DES加密的数据进行解密。这个方法接收以下参数:一个要被解密的的字节数组叫cipherMessage,一个叫做Key的密钥,一个叫iv的初始向量,您需要使用TripleDES相关的类来对信息进行解密,并且它结果放到一个字符串里。那么您会使用那一个代码段呢?()
A.A
B.B
C.C
D.D -
多项选择题
您开发一个名为FileService 的服务应用程序。您将该服务应用程序部署到网络上的多台服务器。 您执行以下代码段。(包括的行号仅供参考。) 01 public void StartService(string serverName){ 02 ServiceController crtl = new 03 ServiceController(" Certkiller App29"); 04 if (crtl.Status == ServiceControllerStatus.Stopped){ 05 } 06 } 您需要开发一个例程,如果FileService 停止,该例程将启动它。该例程必须在由serverName 输入参数确定的服务器上启动FileService。 您应该将哪两行代码添加到代码段?()(每个正确答案都仅给出了部分解决方案。请选择两个答案。) Servername是指机器的名字。
A.在03 行和04 行之间插入以下代码行:crtl.ServiceName = serverName;
B.在03 行和04 行之间插入以下代码行:crtl.MachineName = serverName;
C.在03 行和04 行之间插入以下代码行:crtl.Site.Name = serverName;
D.在04 行和05 行之间插入以下代码行:crtl.Continue();
E.在04 行和05 行之间插入以下代码行:crtl.Start();
F.在04 行和05 行之间插入以下代码行:crtl.ExecuteCommand(0);
