软件高职网http://www.rjjd.com 微软认证中文题库交流
B. 用 Visual Studio .NET 添加 UsefulFunctions.dll的引用. C. 将以下代码段添加到您的应用程序: using UsefulFunctions;
D. 将以下代码段添加到您的应用程序:
[DllImport(“UsefulFunctions.dll”)]
public static extern int CalculateValue(int x); 答案:D 注:原题
解释:我们一定识别在被不处理的 dll 中使用的功能。 注意:.NET Framework开发者引导,强烈的不处理 DLL 功能 .NET Framework开发者引导 , 比较靠近的平台的面貌唤起 错误答案: A:Regsrv32在Visual Studio .NET是不可视的,Regsrv32被用于Visual Basic 6.0,and for Visual C++ 6.0 成分.
B:CalculateValue在被不处理的不是一个 COM 接口的部份 DLL 中。 因此,你不要须关于 TestKingFunctions.dll 的任何参考。
注意: 在Visual Studio .NET IDE 你用 .NET 成分作为参考。web成分,COM成份和到其他的计划,而非窗口自然的 DLLs。 C:我们在使用不被处理的 dll 的命名空间。
QUESTION NO: 22
你正在为汽车代理商开发一个名为Dealer的.NET远程对象,Dealer发布了一个名为
SaveSales的方法,来为代理商保存销售信息。Dealer被配置成使用Integrated Windows
authentication来校验它的调用者。在SaveSales 运行之前,你必须确保SaveSales的所有
用户都是Manager组的成员,你该采用哪个代码段? A. [PrincipalPermission(SecurityAction.Demand, Role=”Manager”)]
public DataSet SaveTestKingSales(DataSet sales) { // Code to save sales data goes here. }yh
Role=Manager”)]
public DataSet SaveTestKingSales(DataSet sales) { // Code to save sales data goes here. }
C. [PrincipalPermission(SecurityAction.InheritanceDemand, Role=”Manager”)]
public DataSet SaveTestKingSales(DataSet sales) { // Code to save sales data goes here. }
D. public DataSet SaveTestKingSales(DataSet sales) { string role = “Manager”;
软件高职网 http://www.rjjd.com 微软认证中文题库交流
软件高职网http://www.rjjd.com 微软认证中文题库交流
PrincipalPermission perm = new PrincipalPermission(null, role); // Code to save sales data goes here. }
Answer: A
Explanation: The code –
PrincipalPermission(SecurityAction.Demand, Role=”Manager”
checks if the active principal is a member of the Manager group. If this is the case the code
will run, if not an exception will be thrown.
解释:这段代码 PrincipalPermission(SecurityAction.Demand, Role=”Manager”) 用来检查正在访问者是否为管理组的成员。如果这段代码被运行,将没有一个例外会被抛出。
Note 1: A demand causes the runtime to perform a security check to enforce restrictions on calling code.
Note 2: The PrincipalPermission class represents the identity or role that the principal must
match and is compatible with both declarative and imperative security checks. 注解1:需求促使运行时间强制对被访问的代码执行一个安全检查。
注解2:主体允许类表现为一致性或者必须与主体的角色匹配,并且适合公布的和强制的安全检查。
Reference: .NET Framework Developer's Guide, Security Demands 参考:.NET框架开发向导,安全要求。
Incorrect Answers
B: A link demand causes a security check during just-in-time compilation and only checks
the immediate caller of the code.
C: You can place inheritance demands at the class level to ensure that only code with the
specified permission can inherit from your class. However, we want to specify who can
run the code, not who can inherit from the class. D: This code is not addressing the problem. 错误的答案
B:连接要求促使安全检查在即时编译期间,并只检查对代码进行过访问的最近的访问者。
C:你可以在类的级别认定继承要求,并保证只有经过允许的访问者,代码才能继承自你的类。然而,我们想要的是,指定谁可以运行这些代码,而不是谁可以继承自这个类。
软件高职网 http://www.rjjd.com 微软认证中文题库交流
软件高职网http://www.rjjd.com 微软认证中文题库交流
QUESTION NO: 23
你创建了三个Windows服务,分别为Serv1, Serv2 和 Serv3。你想使用安装工具
(Installutil.exe)把三个服务安装在计算机ComputerA上。在ComputerA的命令行方式下,
你输入并运行下列命令: Installutil Serv1 Serv2 Serv3
在安装过程中,Serv3弹出一个安装错误,安装过程被取消。现在这三个服务有几个被安
装在ComputerA上了? A. None B. One C. Two D. Three
现在,在这三个服务中,有几个服务被安装在TestKingA上? A.没有; B.一个; C.两个; D.3个;
Answer: A
Explanation: Installutil.exe performs installation in a transactional manner; if one of the
assemblies fails to install, it rolls back the installations of all other assemblies. 答案:A
解释:Installutil.exe执行了一个会相互影响的安装程序;如果组件集中的一个安装失败,它将回滚安装程序中的其他所有组件。
Reference: .NET Framework Tools, Installer Tool (Installutil.exe) 参考:.NET框架工具,安装工具(Installutil.exe)。
Incorrect Answers
B, C; D: The installation of TK3 fails and the installation of TK2 and TK1 is rolled back.
错误的答案
B,C,D:TK3的安装失败,使得TK2和TK1的安装事务也回滚了。
QUESTION NO: 24
You create two serviced components named OrderPipeline and OrderAdmin. Each
component is registered in a separate COM+ server application.
你创建两个服务组件,分别叫做OrderPipeline和OrderAdmin。每个组件分别被注册为COM+服务器应用程序。
Both components use pricing data. OrderPipeline reads the pricing data for placing userorders. OrderAdmin modifies the pricing data.
软件高职网 http://www.rjjd.com 微软认证中文题库交流
软件高职网http://www.rjjd.com 微软认证中文题库交流
两个组件都使用定价数据。OrderPipeline为指定的用户定单读取定价数据。OrderAdmin修改定价数据。
You want to ensure that OrderPipeline accesses the pricing data as quickly as possible,
while still being able to immediately retrieve any pricing changes made by OrderAdmin.
你想保证OrderPipeline尽可能快地访问定价数据,同时还能马上从OrderAdmin那里得到更改后的定价。
What should you do?
A. Store the pricing data in the.
B. Store the pricing data in Microsoft SQL Server database.
C. Store the pricing data in a Hashtable object within OrderAdmin. Expose the Hashtable object through a property on OrderAdmin.
D. Store the pricing data in an XmlDocument object within OrderAdmin. Expose the XmlDocument object through a property on OrderAdmin. 你将怎么做? A. 把所有的定价数据存储在Shared Property Manager; B. 把所有的定价数据存储在Microsoft SQL Server数据库中; C. 把所有的定价数据存储在OrderAdmin中的哈希表对象中,这个哈希表在
OrderAdmin中通过用一个属性来表现; D. 把所有的定价数据用一个XmlDocument对象存储在OrderAdmin中。这个
XmlDocument对象在OrderAdmin中通过用一个属性来表现;
Answer: C
Explanation: A Hashtable can safely support one writer and multiple readers concurrently.
This is the most efficient solution
参考:一个哈希表能够安全地同时支持一个写的进程和多个读的进程。这是最有效的解决方案。
Reference:
.NET Framework Class Library, Hashtable.IsSynchronized Property Platform SDK: COM+ (Component Services), 参考:
.NET框架类库,哈希表同步的特性
开发平台:COM+(组件服务),The Shared Property Manager
Incorrect Answers
A: A Shared Property Manager would be a possible solution, however it is not required and is
not the most efficient solution.
Note: In COM+, shared transient state for objects is managed by using the Shared
软件高职网 http://www.rjjd.com 微软认证中文题库交流
软件高职网http://www.rjjd.com 微软认证中文题库交流
Property Manager (SPM). The SPM is a resource dispenser that you can use to share state
among multiple objects within a server process.
B: SQL Server could provide a solution. However, it would not be the most efficient solution.
D: A hast table would be more efficient. 错误的答案
A:Shared Property Manager或许是个可行的解决方案,然而这不是必需的,也不是最有效的解决方案。
注解:在COM+中,对象的共享非稳定状态是通过SPM来管理的。SPM是一个资源分配器,这样你可以用它来分配资源给一个共享状态的服务进程中的多个对象。
B.SQL服务器可以提供一个解决方案。然而,它将不是最有效的解决方案。 D.一个哈希表将更加有效。
25你有一个叫做Utils的.net远程对象。Utils类是一个可激活的.net远程对象。你要写一个用于创建和使用utile对象的客户应用程序。你希望客户应用程序在执行期间保持引用一个utils对象 你应该怎么做? A. 构造一个utils对象,并在成员变量中保持对象。
B. 构造一个utils对象,设置lifetimeservice.leasetime为0。
C. 在客户应用程序中创建一个isponsor接口,实现Renewal方法扩展lease。 D. 在客户应用程序中创建一个ILease接口,实现CurrentLeaseTime返回int32最大值属性
答案:C
26.你创建了一个称为usermanager的服务组件。Usermanager将用户帐号添加到多个事务数据源
Usermanager类包含以下代码字段:
[Transaction(TransactionOption.Required)] [SecurityRole(“Admin”)]
public class UserManager : ServicedComponent {
public void AddUser(string TestKname, string TestKpassword) {
// Code to add the user to data sources goes here. } }
你必须使增加用户方法能可靠的保存新用户所有数据资源或者什么数据都没有。 你应该做什么?
A. 将以下属性添加至AddUser:[AutoComplete()]。
B. 将以下属性添加至UserManager:[JustInTimeActivation(false)]。 C. 将以下代码行添加到Adduser的末尾:ContextUtil.EnableCommit();
软件高职网 http://www.rjjd.com 微软认证中文题库交流