作业帮 > 微软认证(MCSE) > 教育资讯

2013微软认证考试练习题及答案(11)[1]

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/11 05:13:23 微软认证(MCSE)
2013微软认证考试练习题及答案(11)[1]
2013微软认证考试练习题及答案(11)[1]微软认证(MCSE)
【网络综合 - 微软认证(MCSE)试题】
无忧考网为大家收集整理了《2013微软认证考试练习题及答案(11)》供大家参考,希望对大家有所帮助!!!

第 51 题
你正在为应用域创建一个新的安全策略。你写了如下代码:
PolicyLevel policy = PolicyLevel.CreateAppDomainLevel();
PolicyStatement noTrustStatement =new PolicyStatement(
policy.GetNamedPermissionSet("Nothing"));
PolicyStatement fullTrustStatement =new PolicyStatement(
policy.GetNamedPermissionSet("FullTrust"));
你需要为策略安排代码组,以至装载程序集默认为Nothing权限集。如果程序集从trusted zone
装载,则安全策略必须许可程序集为完全信任。(FullTrust permission set)。你应该使用那个
代码段?
A. CodeGroup group1 = new FirstMatchCodeGroup(
new ZoneMembershipCondition(SecurityZone.Trusted),
fullTrustStatement); CodeGroup group2 = new UnionCodegroup(
new AllMembershipCondition(),
noTrustStatement); group1.AddChild(group2);
B. CodeGroup group1 = new FirstMatchCodeGroup(
new AllMembershipCondition(),
noTrustStatement); CodeGroup group2 = new UnionCodeGroup(
new ZoneMembershipCondition(SecurityZone.Trusted),
fullTrustStatement); group1.AddChild(group2);
C. CodeGroup group = new UnionCodeGroup(
new ZoneMembershipCondition(SecurityZone.Trusted),
fullTrustStatement);
D. CodeGroup group = new FirstMatchCodeGroup(
new AllMembershipCondition(),noTrustStatement);
答案: B

第 52 题
你正在开发一个名为 PollingService 的服务,这个服务定期的调用一些需要长时间运行的过程。
这些过程被 DoWork 方法调用。你的服务代码如下:
ServiceBase {
bool blnExit = false; public PollingService() {}
protected override void OnStart(string[] args) {
do {
DoWork();
} while (!blnExit);
}
protected override void OnStop() {
blnExit = true;
}
private void DoWork() {
...
} }
当你试图去启动服务的时候,你收到一个错误:在本地计算机上不能启动PollingService服务。
Error 1053:服务不响应启动或控制。你需要去修改服务代码,使服务能够被正确启动。你应该
如何做?
A. 把循环代码从OnStart 方法移动到服务类的构造函数中。
B. 在服务的设计界面拖入一个timer组件。把调用长运行时间过程的代码从OnStart方法移动到
timer的Tick事件中。在OnStart方法中设置timer的Enabled属性为True,并且调用timer的Star微软认证(MCSE)