微軟認(rèn)證考試資料



《微軟認(rèn)證考試資料》由會(huì)員分享,可在線閱讀,更多相關(guān)《微軟認(rèn)證考試資料(108頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。
1、1、 question 1 You work as the application developer at Cer-Tech.. Cer-Tech. uses Visual Studio.Net 2005 as its application development platform. 你在Cer-Tech.做應(yīng)用程序開(kāi)發(fā)人員,Cer-Tech.使用VS2005作為其應(yīng)用程序的開(kāi)發(fā)平臺(tái)。 You are developing a .Net Framework 2.0 application used to store a type-safe list of names and add
2、resses. 你正在開(kāi)發(fā)一個(gè).Net Framework 2.0應(yīng)用程序,用來(lái)存儲(chǔ)一個(gè)包含了某某和電子的類型安全的列表〔清單〕。 The list will be populated all at once from the sorted data which means you well not always need to perform insertion or deletion operations on thd data. 這個(gè)列表會(huì)被完全的填充從排序的數(shù)據(jù),這就意味著你不需要經(jīng)常對(duì)數(shù)據(jù)完成插入或刪除操作。 You are required to choose a data
3、 structure that optimizes〔優(yōu)化〕 memory use and has good performance. 請(qǐng)你選擇一個(gè)數(shù)據(jù)結(jié)構(gòu),以便優(yōu)化內(nèi)存使用,具有良好的性能。 What should you do? 該如何做? A、 B、 C、 D、 點(diǎn)評(píng): SortedList 表示鍵/值對(duì)的集合,鍵值對(duì)按鍵排序并可按照鍵和索引訪問(wèn)。 HashTable 表示鍵/值對(duì)的集合,鍵值對(duì)根據(jù)鍵的哈希代碼進(jìn)展組織。 C 該類不存在 D 非類型安全的,沒(méi)有引人泛型。 2、 Question 2 You work as an application dev
4、eloper at Cer-Tech.. You have recently created an application that include the code shown below. 你在Cer-Tech.做應(yīng)用程序開(kāi)發(fā)人員。最近你創(chuàng)建了一個(gè)應(yīng)用程序,包含如下的代碼: public delegate string GetFileContentsDel(); public string GetFileContens() { //Process file and return results } You now need to invoke the GetFileCon
5、tents method asynchronously(異步).You have to ensure that the code you use to invoke the GetFileContents method will continue to process other user instructions,and displays the results as soon as the GetFileContents method finishes processing. What should you do? 現(xiàn)在你需要異步調(diào)用GetFileContents方法。必須確保你的代碼在
6、調(diào)用GetFileContents方法的同時(shí)將繼續(xù)處理其他用戶的指令,并在GetFileContents方法完成處理后顯示結(jié)果。你應(yīng)該做? A、 Use the following code: //創(chuàng)建委托對(duì)象并且實(shí)例化 GetFileContentsDel delAsync=new GetFileContentsDel(GetFileContents); IAsyncResult result=delAsync.BeginInvoke(null,null); while(!resul.Ispleted) { //Process other user instruction
7、s } string strFile=delAsync.EndInvoke(result); B、 Use the following code: GetFileContentsDel delAsync=new GetFileContentsDel(GetFileContents); string strFile=delAsync.Invoke(); //直接調(diào)用 C、 Use the following code: string strFile=GetFileContents.Invoke();//語(yǔ)法錯(cuò)誤 D、 Use the following code: GetFil
8、eContentsDel delAsync=new GetFileContentsDel(GetFileContents); IAsyncResult result=delAsync.BeginInvoke(null,null); //Process other user instructions string strFile=delAsync.EndInvoke(result); 點(diǎn)評(píng):IAsyncResult 包含異步操作的方法的類實(shí)現(xiàn)。對(duì)于只有同步方法的對(duì)象,只需要定義一個(gè)委托,并使用其BeginInvoke和EndInvoke方法就可以了。 B、直接調(diào)用
9、 C、語(yǔ)法錯(cuò)誤 D、與題意不符合,沒(méi)有狀態(tài)判斷 3、 Question 3 You work as the application developer at Hi-Tech.. You have created a new service application named App01.App01 must still be deployed into the Hi-Tech. network. A Hi-Tech. network administrator named Rosanne Keith has already created a user
10、ccount for App01. You must configure App01 to run in the context of this new user account.What should you do next? 你在Hi-Tech.做應(yīng)用程序開(kāi)發(fā)人員。你已經(jīng)創(chuàng)建了一個(gè)新的服務(wù)應(yīng)用程序命名App01.該服務(wù)必須部署在Hi-Tech.的網(wǎng)絡(luò)中。Hi-Tech.的一個(gè)叫羅薩安娜基思的網(wǎng)絡(luò)管理員已經(jīng)創(chuàng)建了App01的用戶某某。在新的用戶某某下要運(yùn)行App01,你必須做一些相應(yīng)的配置。下一步應(yīng)該做? A、 Before Deploying App01,specify the sta
11、rtType property of the ServiceInstaller class. B、 Before delploying App01,specify the Account,Username,and Password properties of the ServiceProcessInstaller class. 在部署App01之前,指定賬戶,用戶名和密碼的ServiceProcessInstaller類的屬性。 C、 Install the service by using the CONFIG option of the net.exe mand-line tool.
12、 D、 Install the service by using the installutil.exe mand-line tool. 點(diǎn)評(píng): 4、 Question 4 You pass a value-type variable into a procedure as an argument.The procedure changes the variable;however,when the procedure returns,the variable has not changed.What happened?(Choose one.) 你在一個(gè)方法中傳入了一個(gè)值類型的變量
13、做參數(shù)。方法里改變了這個(gè)變量;而當(dāng)方法返回時(shí),變量的值并沒(méi)有被改變。這是為?〔選擇一項(xiàng)〕 A、 The variable was not initialized before it was passed in. 該變量在傳入的時(shí)候沒(méi)有被初始化 B、 Passing a value type into a procedure creates a copy of the data. 向方法里傳入值類型的變量,實(shí)際上是傳入了一個(gè)數(shù)據(jù)的副本。 C、 The variable was redeclared within the procedure level. 在方法體中重新申明了這個(gè)變
14、量。 D、 The procedure handled the variable as a reference. 方法按引用處理了該變量 點(diǎn)評(píng):考察了數(shù)據(jù)傳參的方式:按值傳參和按引用傳參。 5、 Question 5 You work as the application developer at Hi-Tech.. You are working on a new application named App01. App01 is configured to perform a series of mathematical calculations. 你在Hi-tech
15、.做應(yīng)用程序開(kāi)發(fā)人員。正在開(kāi)發(fā)一款新的應(yīng)用程序,名字叫App01;App01配置為執(zhí)行一系列的數(shù)學(xué)計(jì)算。 You create a class named AppClass and create a procedure named AppSP. AppSP must execute on an instance of the class. 你創(chuàng)建了一個(gè)AppClass的類和一個(gè)AppSP的方法。該方法必須作為該類的實(shí)例運(yùn)行。 You must configure the application’s user interface(UI) so that it continues to re
16、spond for the duration that calculations are performed.You must write the code segment for calling the AppSP procedure which will acplish your objective.Choose the code segment which you should use. 你必須配置應(yīng)用程序的用戶界面,以便它在進(jìn)展計(jì)算期間能夠繼續(xù)做出響應(yīng)。你必須編寫用于調(diào)用AppSP程序的代碼,以實(shí)現(xiàn)上述目標(biāo)。選擇下面的那段代碼可以使用。 A、 private void AppSP(
17、){….} private void DoWork() { AppClass myValues=new AppClass(); Thread newThread=new Thread(new ThreadStart(AppSP)); newThread.Start(myValues); } B、 private void AppSP(){…} private void DoWork() { AppClass myValues=new AppClass(); ThreadStart delStart=new ThreadStart(AppSP); Thread
18、 newThread=new Thread(delStart); if(newThread.IsAlive) { new Thread.Start(myValues); } } C、 private void AppSP(AppClass values){…..} private void DoWork() { AppClass myValues=new AppClass(); Application.DoEvents(); AppSP(myValues); Application.DoEvents(); } D、 private void AppSP(object
19、 values){….} private void DoWork() { AppClass myValues=new AppClass(); Thread newThread=new Thread(new ParameterizedThreadStart(AppSP)); } 點(diǎn)評(píng):引入線程 ThreadStart 該委托不能帶參數(shù) ParameterizedThreadStart 該委托可以帶參數(shù) 6、 question 6 You work as the application developer at Cer-Tech.. Cer
20、-Tech. uses Visual Studio.Net2005 as its application development platform. 你在Cer-Tech.做應(yīng)用程序開(kāi)發(fā)人員。Cer-Tech.用VS2005作為其開(kāi)發(fā)平臺(tái)。 You are developing a .NET Framework 2.0 financial application and are busy developing a module that backs up the critical data on a separate hard drive. You are required to
21、 decide which properties of the DriveInfo class to use and find the type of file system like FAT or NTFS and the drive free space and the user disk quota(配額/指標(biāo)) should be ignored by the application. 你必須決定DriverInfo類使用的參數(shù),找到像FAT或者NTFS類型的文件系統(tǒng)和磁盤的可以空間,并使應(yīng)用程序忽略用戶磁盤的配額。 What should you do?該如何做? A、 Use
22、 the DriveFormat and TotalFreeSpace properties of the DriveInfo class. B、 Use the DriveType and AvailableFreeSpace properties of the DriveInfo class. C、 Use the VolumeLabel and TotalSize properties of the DriveInfo class D、 Use the DriveType and TotalSize properties of the DriveInfo class. E、 Us
23、e the DriveFormat and AvailableFreeSpace properties of the DriveInfo class. 點(diǎn)評(píng):DriverInfo類的常用屬性和方法 沒(méi)有找到指定的屬性 7、 Question 7 You are writing a method for a console application that lists options available to a user based on his group memberships.Which technique should you use? 你正在為一個(gè)控制臺(tái)應(yīng)用程序?qū)?/p>
24、一個(gè)方法,給一個(gè)基于組成員的用戶列出可用的選項(xiàng)。下面哪項(xiàng)技術(shù)可以? A、 WindowsPrincipal.IsInRole B、 WindowsIdentity.IsInRole C、 Imperative(迫切的) RBS demands(需求) D、 Declarative(聲明) RBS demands 點(diǎn)評(píng):WindowsPrincipal 允許代碼檢查Windows用戶的Windows組成員身份 WindowsIdentity 表示W(wǎng)indows用戶 8、 Question 8 You are as the application developer a
25、t Hi-Tech.. You are working on an application named App01. App01 must be configured to use role-based security and authentication. 你在Hi-tech.做應(yīng)用程序開(kāi)發(fā)人員。正在開(kāi)發(fā)一款A(yù)pp01的應(yīng)用程序。該程序必須配置為使用基于角色安全和身份驗(yàn)證。 You must develop the code segment which will result in the runtime assigning an unauthenticated principal
26、object to each running thread. 你必須開(kāi)發(fā)代碼段,這將導(dǎo)致在運(yùn)行時(shí)分配了一個(gè)未經(jīng)驗(yàn)證的主要對(duì)象對(duì)每個(gè)運(yùn)行的線程。 Choose the code segment which will acplish the task. 選擇那段代碼可以實(shí)現(xiàn)。 A、 AppDomain domain=AppDomain.CurrentDomain; domain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal) B、 AppDomain domain=AppDomain.CurrentDomain; domai
27、n.SetThreadPrincipal(new WindowsPrinipal(null)); C、 AppDomain domain=AppDomain.CurrentDomain; domain.SetAppDomainPolicy(PolicyLevel.CreateAppDomainLevel()); D、 AppDomain domain=AppDomain.CurrentDomain; domain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal); 點(diǎn)評(píng):AppDomain 表示應(yīng)用程序
28、域,它表示一個(gè)應(yīng)用程序在其中執(zhí)行的獨(dú)立環(huán)境。無(wú)法繼承此類。 9、 Question 9 Given the best answer,which of the following lines of code would reverse(反向/倒轉(zhuǎn)) the security restriction?(Choose all than apply) 給出最好的答案,下面的那個(gè)代碼行會(huì)破壞安全限制?〔選擇多項(xiàng)〕 ‘VB ‘注釋 Dim e as EventLogPermission=New EventLogPermission(PermissionState.Unrestricte
29、d) PermitOnly //C# EventLogPermission e=new EventLogPermission(PermissionState.Unrestricted); PermitOnly(); A、e.RevertPermitOnly B、CodeAccessPermission.RevertPermitOnly C、e.RevertAll D、CodeAccessPermission.RevertAll E、e.RevertDeny F、CodeAccessPermission.RevertDeny 點(diǎn)評(píng):CodeAccessPermissio
30、n類 定義了一個(gè)所有代碼訪問(wèn)權(quán)限的底層結(jié)構(gòu) 10、 Question 10 You work as the application developer at Hi-Tech.. You are working on a new requirement. You have to create a class library that will open the network socket connections to puters on the Hi-Tech. network. 你在Hi-Tech.做應(yīng)用程序開(kāi)發(fā)員。在工作上有了新的要求,需要?jiǎng)?chuàng)建一個(gè)類庫(kù),將打開(kāi)網(wǎng)絡(luò)套接字
31、連接上Hi-Tech.的網(wǎng)絡(luò)。 The class library must be deployed to the global assembly cache, with full trust granted. To cater for network socket connections being used, you develop this code segment; 該類庫(kù)必須部署到全局程序集緩存,授予完全信任。為配合正在使用的網(wǎng)絡(luò)套接字連接,你開(kāi)發(fā)如下的代碼段: SocketPermission permission=new SocketPermission(Permissi
32、onState.Unrestricted); permission.Assert(); You discover though that there are certain existing applications which do not have the required permissions to open the network socket connections. You decide to cancel the assertion. Choose the code segment which will acplish this task. 你發(fā)現(xiàn),雖然有一些現(xiàn)有的應(yīng)用程
33、序不具有所需的權(quán)限打開(kāi)網(wǎng)絡(luò)套接字連接,你決定取消這一斷言,選擇代碼段將完成這項(xiàng)任務(wù)。 A、 CodeAccessPermission.RevertAssert(); B、 CodeAccessPermission.RevertDeny(); C、 permission.Deny(); D、 permission.PermitOnly(); 點(diǎn)評(píng):SocketPermission C和D不正確。 B 是對(duì)permission.Deny()方法的操作。 11、 question 11 You work as an application developer at Cer-T
34、ech.. You are required to dynamically load assemblies into a custom child application domain. 你在Cer-Tech.做應(yīng)用程序開(kāi)發(fā)員。要求動(dòng)態(tài)的加載程序集到一個(gè)自定義的子應(yīng)用程序域。 You need to ensure that the assemblies loaded into the child application domain have the same permissions as the applications that are accessed across the lo
35、cal intranet. 你必須確保子應(yīng)用程序域中加載的程序集有整個(gè)本地intranet訪問(wèn)的所有應(yīng)用程序有一樣的權(quán)限。 What should you do?該如何做? A、 Use the following code to create the child application domain: Evidence childEvidence=new Evidence(new object[]{SecurityZone.Intranet},null); AppDomain.CreateDomain(“ChildDomain〞,childEvidence); B、 Use th
36、e following code to create the child application domain: AppDomain.CreateDomain(“ChildDomain〞,SecurityZone.Intranet); C、 Use the following code to create the child application domain: AppDomain domain=new AppDomain(“ChildDomain〞,SecurityZone.Intranet); D、 Use the following code to create the chi
37、ld application domain: Evidence childEvidence=new Evidence(new object[]{SecurityZone.Intranet},null); AppDomain domain=new AppDomain(“ChildDomain〞,childEvidence); 點(diǎn)評(píng):Evidence(證據(jù)) AppDomain:表示應(yīng)用程序域,它是一個(gè)應(yīng)用程序在其中執(zhí)行的獨(dú)立環(huán)境。 C和D錯(cuò)誤,因?yàn)锳ppDomain的對(duì)象是不能通過(guò)new創(chuàng)建出來(lái)的。 B 第二個(gè)參數(shù)的類型不正確。SecurityZone是一個(gè)枚舉,定義與安
38、全策略所使用的安全區(qū)域相對(duì)應(yīng)的整數(shù)值。〔System.Security〕 AppDomain.CreateDomain(“字符串〞,Evidence對(duì)象); 參數(shù)一:域的友好名稱 參數(shù)二: 12、 Question 12 You work as the application developer at Hi-Tech.. You create a code segment which will implement the class named Class01. The code segment is shown here: 你在Hi-Tech.在應(yīng)用程序開(kāi)發(fā)人員
39、。你創(chuàng)建了一個(gè)將實(shí)現(xiàn)Class01類的代碼片段。如下: MyMethod function. public class Class01 { public int MyMethod(int arg) { return arg; } } You want the Class01.MyMethod function to be dynamically called from a separate class within the assembly. 你希望Class01.MyMethod方法是動(dòng)態(tài)的從本程序集內(nèi)的另外一個(gè)類中調(diào)用。 Choose the code segment
40、 which you should use to acplish the task.. 選擇能夠完成上述任務(wù)的代碼段。 A、 Class01 myClass=new Class01(); Type t=typeof(Class01); MethodInfo m=t.GetMethod(“MyMethod〞); int i=(int)m.Invoke(this,new object[]{1}); B、 Class01 myClass=new Class01(); Type t=typeof(Class01); MethodInfo m=t.GetMethod(“MyMethod
41、〞); int i=(int)m.Invoke(myClass,new object[]{1}); C、 Class01 myClass=new Class01(); Type t=typeof(Class01); MethodInfo m=t.GetMethod(“Class01.MyMethod〞); int i=(int)m.Invoke(myClass,new object[]{1}); D、 Type t=Type.GetType(“Class01〞); MethodInfo m=t.GetMethod(“MyMethod〞); int i=(int)m.Invoke
42、(this,new object[]{1}); 點(diǎn)評(píng):反射 A和D不正確,因?yàn)樵诹硗庖粋€(gè)類中通過(guò)反射讀取Class01中MyMethod的方法。Invoke的第一個(gè)參數(shù)是要反射的類的實(shí)例。 C不正確,GetMethod(“方法名〞),不需要加類名的限定符。 13、 Question 13 You work as the application developer at Hi-Tech.. You are working on an existing application and must load a new assembly into this application. Yo
43、u must write the code segment that will require the mon language runtime(CLR) to grant the assembly a permission set,as though the assembly was loaded from the local intranet zone.You must ensure that the default evidence for the assembly is overridden and must create the evidence collection. 你在Hi-
44、Tech.做應(yīng)用程序開(kāi)發(fā)人員。你正在開(kāi)發(fā)一個(gè)現(xiàn)有的應(yīng)用程序,而且必須加載一個(gè)新的程序集到該程序中。雖然這個(gè)程序集加載自本地intranet,你必須編寫代碼段使得公共語(yǔ)言運(yùn)行時(shí)〔CLR〕授權(quán)給程序集一個(gè)權(quán)限集。你必須確保給程序集提供的默認(rèn)證據(jù)被重寫,并且創(chuàng)建一個(gè)新的證據(jù)集。 Choose the code segment which will acplish this task. A、 Evidence evidence=new Evidence(Assembly.GetExecutingAssembly().Evidence); GetExecutingAssembly()獲取當(dāng)前執(zhí)行代
45、碼的程序集 Evidence獲取此程序集的證據(jù) B、 Evidence evidence=new Evidence(); evidence.AddAssembly(new Zone(SecurityZone.Intranet)); 將指定的程序集證據(jù)添加到程序集 C、 Evidence evidence=new Evidence(); evidence.AddHost(new Zone(SecurityZone.Intranet)); 將主機(jī)提供的指定證據(jù)添加到程序集 D、 點(diǎn)評(píng):定義組成對(duì)安全策略決策的輸入的一組信息,無(wú)法繼承此類。 Evidence是一個(gè)集合,它持有
46、一組表示證據(jù)的對(duì)象。該類有兩個(gè)與證據(jù)源〔主機(jī)證據(jù)和程序集證據(jù)〕對(duì)于的集合。 Host evidence由主機(jī)提供;Assembly evidence是程序集本身的一局部。 A和D都是獲得當(dāng)前程序集的證據(jù)集,與題意不符合。B 14、 Question 14 You are creating a front-end interface to a back-end database that stores user names and groups within the database itself. The user database is very simple,storing onl
47、y user names and group memberships. You want to be able to use imperative and declarative RBS demands within your application based on the custom user database.Which of the following classes meets your requirements and would be most efficient to implement?(Choose all that apply) 你正在創(chuàng)建一個(gè)前端界面后端數(shù)據(jù)庫(kù),用于
48、存儲(chǔ)用戶名和組在數(shù)據(jù)庫(kù)中。用戶數(shù)據(jù)庫(kù)非常簡(jiǎn)單,只存儲(chǔ)用戶名和組成員。你希望在自定義用戶數(shù)據(jù)庫(kù)的應(yīng)用程序根底上使用命令聲明遠(yuǎn)程Blob存儲(chǔ)命令。下面那些類滿足你的要求并能有效的實(shí)現(xiàn)?〔選擇多項(xiàng)〕 A、 GenericIdentity B、 GenericPrincipal C、 IIdentity D、 IPrincipal 點(diǎn)評(píng): System. System. 15、 Question 15 You work as the application developer at Hi-Tech.. You are creating a new code segment w
49、hich is to be used for user authentication(認(rèn)證) and authorization(授權(quán)) purposes. The current application data store already stores the username,password, and roles. You must establish the user security context, which should be used for the authorization checks like IsInRole. To authorize the user, you
50、 have started developing the following code segment; 你在Hi-Tech.做應(yīng)用程序開(kāi)發(fā)人員。你正在創(chuàng)建一個(gè)新的代碼段將被用于用戶認(rèn)證和授權(quán)的目的〔用途〕。當(dāng)前應(yīng)用程序的數(shù)據(jù)存儲(chǔ)已經(jīng)存儲(chǔ)了用戶名、密碼和角色。你必須營(yíng)造一個(gè)安全的用戶環(huán)境,將被用于類似IsInRole的授權(quán)檢查。對(duì)授權(quán)用戶,你已經(jīng)開(kāi)始開(kāi)發(fā)如下的代碼段: if(!TestPassword(username,password)) Throw new Exception(“user not authenticated〞); String[]userRolesArray=Loo
51、kupUserRoles(userName); (判斷該用戶名和密碼是否是認(rèn)證用戶。如果不是就拋出一個(gè)異常;否如此讀取該用戶的角色復(fù)制該一個(gè)字符串?dāng)?shù)組) From the options below,choose the code which will make the code segment plete. 從下面的選項(xiàng)中,選擇正確的代碼: A、 GenericIdentity ident=new GenericIdentity(userName); GenericPrincipal currentUser=new GenericPrincipal(ident,userRolesA
52、rray); Thread.CurrentPrincipal=currentUser; B、 WindowsIdentity ident=new WindowsIdentity(userName); WindowsPrincipal currentUser=new WindowsPrincipal(ident); Thread.CurrentPrincipal=currentUser; C、 NTAccount userNTName=new NTAccount(userName); GenericIdentity ident=new GenericIdentity(userNTNa
53、me.Value); GenericPrincipal currentUser=new GenericPrincipal(ident,userRolesArray); Thread.CurrentPrincipal=currentUser; D、 IntPtr token=IntPtr.Zero; Token=LogonUserUsingInterop(username,encryptedPassword); WindowsImpersonationContext ctx=WindowsIdentity.Impersonate(token); 點(diǎn)評(píng):GenericIdentity
54、 GenericPrincipal NTAcount 用戶或組的賬戶類 16、 Question 16 You work as an application developer at Cer-Tech.. Cer-Tech. has asked you to create an application that copies file content from one file on a client puter named XXYYinc-WS007 to a new file an a server named Server01. 你在Cer-Tec
55、h.做應(yīng)用程序開(kāi)發(fā)人員。Cer-Tech.讓你實(shí)現(xiàn)一個(gè)應(yīng)用程序:復(fù)制文件內(nèi)容從客戶端機(jī)器〔XXYYinc-WS007〕的一個(gè)文件到服務(wù)器端〔Server01〕的新文件。 The method displayed in the following exhibit is included in the new application; you have to ensure that the application copies all permissions on the original(原始) file to the new file. You should alse make sure t
56、hat the new file does not inherit(繼承) its permissions from the destination(目的地) directory on Server01. What should you do? 下面展示的方法包含在新的應(yīng)用程序中;你必須確保應(yīng)用程序復(fù)制所有原始文件權(quán)限到新文件。你還必須確保新文件不繼承服務(wù)器端Server01目標(biāo)的權(quán)限。 A、 Add the following code to the copy method: file2.SetAccessControl(file1.GetAccessControl()); B、 A
57、dd the following code to the copy method:FileSecurity aci=file1.GetAccessControl(); aci.SetAccessRuleProtection(true,true); //第一個(gè)參數(shù):true防止被繼承;false允許繼承 //第二個(gè)參數(shù):true保存繼承的訪問(wèn)規(guī)如此;false不保存繼承的訪問(wèn)規(guī)如此 file2.SetAccessControl(aci); C、 Add the following code to the copy method:file2.SetAccessControl(file1.
58、GetAccessControl(),false); D、 Add the following code to the copy method: FileSecurity aci=file1.GetAccessControl(); aci.SetAccessRuleProtection(true,false); file2.SetAccessControl(aci); 點(diǎn)評(píng):FileSecurity 表示文件的訪問(wèn)控制和審核安全 C參數(shù)不正確;A沒(méi)有設(shè)置;D設(shè)置錯(cuò)誤 17、 Question 17 You work as the application develope
59、r at Hi-Tech.. You want to modify the current security settings of a file named Data.xml, as follows: 你在Hi-Tech.做應(yīng)用程序開(kāi)發(fā)人員。你要修改當(dāng)前名為Data.xml文件的安全設(shè)置。如下: 1. You must preserve all existing inherited access rules. 你必須保存所有現(xiàn)有的繼承的訪問(wèn)規(guī)如此。 2. You must prevent the access rules from inheriting future modific
60、ations. 你必須防止日后修改繼承的訪問(wèn)規(guī)如此。 Choose the code segment which will acplish the task. 選擇能夠?qū)崿F(xiàn)任務(wù)的代碼 A、 FileSecurity security=new FileSecurity(“Data.xml〞,AccessControlSections.All); security.SetAccessRuleProtection(true,true); File.SetAccessControl(“Data.xml〞,security); B、 FileSecurity security=new Fi
61、leSecurity(); security.SetAccessRuleProtection(true,true); File.SetAccessControl(“Data.xml〞,security); C、 FileSecurity security=File.GetAccessControl(“Data.xml〞); security.SetAccessRuleProtection(true,true); D、 FileSecurity security=File.GetAccessControl(“Data.xml〞); security.SetAuditRuleProte
62、ction(true,true); File.SetAccessControl(“Data.xml〞,security); 點(diǎn)評(píng):FileSecurity AccessControlSections〔枚舉〕 指定要保存或加載安全性說(shuō)明符的那些局部。 18、 Question 18 You work as an application developer at Cer-Tech.. You are currently creating an application that requires role-based security. You are planning to utiliz
63、e(利用/采用) a database to store the user accounts and group membership data. You need to ensure that users are able to log on and off. You alse need to ensure that the application you have created tracks the user accounts of thess users, and restrict or allow access to code based on their group members
64、hip. You need to achieve this objective with as little developer effort as possible. What should you do to implement role-based security? 你在Cer-Tech.做應(yīng)用程序開(kāi)發(fā)人員。當(dāng)前你正在創(chuàng)建一個(gè)基于角色安全的應(yīng)用程序。計(jì)劃采用數(shù)據(jù)庫(kù)存儲(chǔ)用戶賬戶和組成員數(shù)據(jù)。你需要確保用戶能夠登錄和關(guān)閉,同時(shí)你還需要確保你所創(chuàng)建的應(yīng)用程序跟蹤用戶的用戶某某,根據(jù)組成員限制或允許訪問(wèn)代碼。你需要盡快實(shí)現(xiàn)這一目標(biāo)。你應(yīng)該做來(lái)實(shí)現(xiàn)角色安全? A、 Inherit from
65、 the GenericIdentity and GenericPrincipal classes. B、 Make use of GenericIdentity and GenericPrincipal objects. C、 Implement the IIdentity and IPrincipal interfaces. D、 Make use of〔利用〕 WindowsIdentity and WindowsPrincipal objects 點(diǎn)評(píng): 19、 Question 19 You work as the application developer at Hi
66、-Tech.. You are writing a method that will run through the credentials〔憑據(jù)〕 of the end user.Microsoft Windows groups must be used to authorize the user. You must develop the code segment which will recognize if the user exists in the local group named Sales. 你在Hi-tech.做應(yīng)用程序開(kāi)發(fā)人員。你正在寫一個(gè)方法,將貫穿與最終用戶的憑據(jù)。微軟Windows組必須使用授權(quán)的用戶。如果在本地組存在一個(gè)名為Sales的用戶,你必須開(kāi)發(fā)能夠認(rèn)識(shí)它的代碼。 Choose the code segment that will do this. 選擇能夠?qū)崿F(xiàn)上述任務(wù)的代碼段 A、 WindowsIdentity currentUser=WindowsIdentity.GetCurrent(); foreah(IdentityRefere
- 溫馨提示:
1: 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 專題黨課講稿:以高質(zhì)量黨建保障國(guó)有企業(yè)高質(zhì)量發(fā)展
- 廉政黨課講稿材料:堅(jiān)決打好反腐敗斗爭(zhēng)攻堅(jiān)戰(zhàn)持久戰(zhàn)總體戰(zhàn)涵養(yǎng)風(fēng)清氣正的政治生態(tài)
- 在新錄用選調(diào)生公務(wù)員座談會(huì)上和基層單位調(diào)研座談會(huì)上的發(fā)言材料
- 總工會(huì)關(guān)于2025年維護(hù)勞動(dòng)領(lǐng)域政治安全的工作匯報(bào)材料
- 基層黨建工作交流研討會(huì)上的講話發(fā)言材料
- 糧食和物資儲(chǔ)備學(xué)習(xí)教育工作部署會(huì)上的講話發(fā)言材料
- 市工業(yè)園區(qū)、市直機(jī)關(guān)單位、市紀(jì)委監(jiān)委2025年工作計(jì)劃
- 檢察院政治部關(guān)于2025年工作計(jì)劃
- 辦公室主任2025年現(xiàn)實(shí)表現(xiàn)材料
- 2025年~村農(nóng)村保潔員規(guī)范管理工作方案
- 在深入貫徹中央8項(xiàng)規(guī)定精神學(xué)習(xí)教育工作部署會(huì)議上的講話發(fā)言材料4篇
- 開(kāi)展深入貫徹規(guī)定精神學(xué)習(xí)教育動(dòng)員部署會(huì)上的講話發(fā)言材料3篇
- 在司法黨組中心學(xué)習(xí)組學(xué)習(xí)會(huì)上的發(fā)言材料
- 國(guó)企黨委關(guān)于推動(dòng)基層黨建與生產(chǎn)經(jīng)營(yíng)深度融合工作情況的報(bào)告材料
- 副書(shū)記在2025年工作務(wù)虛會(huì)上的發(fā)言材料2篇