秋霞电影网午夜鲁丝片无码,真人h视频免费观看视频,囯产av无码片毛片一级,免费夜色私人影院在线观看,亚洲美女综合香蕉片,亚洲aⅴ天堂av在线电影猫咪,日韩三级片网址入口

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

上傳人:s**** 文檔編號(hào):75466902 上傳時(shí)間:2022-04-15 格式:DOC 頁(yè)數(shù):109 大?。?75.50KB
收藏 版權(quán)申訴 舉報(bào) 下載
微軟認(rèn)證考試資料全_第1頁(yè)
第1頁(yè) / 共109頁(yè)
微軟認(rèn)證考試資料全_第2頁(yè)
第2頁(yè) / 共109頁(yè)
微軟認(rèn)證考試資料全_第3頁(yè)
第3頁(yè) / 共109頁(yè)

下載文檔到電腦,查找使用更方便

30 積分

下載資源

還剩頁(yè)未讀,繼續(xù)閱讀

資源描述:

《微軟認(rèn)證考試資料全》由會(huì)員分享,可在線閱讀,更多相關(guān)《微軟認(rèn)證考試資料全(109頁(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-

2、safe list of names and addresses. 你正在開(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 ar

3、e required to choose a data structure that optimizes(優(yōu)化) memory use and has good performance. 請(qǐng)你選擇一個(gè)數(shù)據(jù)結(jié)構(gòu),以便優(yōu)化存使用,具有良好的性能。 What should you do? 該如何做? A、 The System.Collections.Generic.SortedList class should be used B、 The System.Collections.HashTable class should be used C、 The System.Collectio

4、ns.Generic.SortedDictionary class should be used D、 The System.Collections.SortedList class should be used 點(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 developer at Cer-Tech.. You have

5、 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 GetFileContents method asynchronousl

6、y(異步).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方法。必須確保你的代碼在調(diào)用GetFileContents方法的同時(shí)將繼續(xù)處

7、理其他用戶的指令,并在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.IsCompleted) { //Process other user instructions } string strFile=

8、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: GetFileContentsDel delAsync

9、=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)用 C、語(yǔ)法錯(cuò)誤

10、 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 ccount for App01. You

11、 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 startType propert

12、y 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 command-line tool. D、 Instal

13、l the service by using the installutil.exe command-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è)值類型的變量做參數(shù)。方法里改

14、變了這個(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è)變量。 D、

15、 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 做應(yīng)

16、用程序開(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 respo

17、nd for the duration that calculations are performed.You must write the code segment for calling the AppSP procedure which will accomplish your objective.Choose the code segment which you should use. 你必須配置應(yīng)用程序的用戶界面,以便它在進(jìn)行計(jì)算期間能夠繼續(xù)做出響應(yīng)。你必須編寫(xiě)用于調(diào)用AppSP程序的代碼,以實(shí)現(xiàn)上述目標(biāo)。選擇下面的那段代碼可以使用。 A、 private void AppSP(

18、){….} 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

19、 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

20、 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

21、-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. 你正在開(kāi)發(fā)一款.net2.0的

22、財(cái)務(wù)應(yīng)用程序,并忙于開(kāi)發(fā)一個(gè)模塊,備份關(guān)鍵數(shù)據(jù)到一個(gè)獨(dú)立的硬盤(pán)驅(qū)動(dòng)器(硬盤(pán)) You are required to 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)

23、和磁盤(pán)的可以空間,并使應(yīng)用程序忽略用戶磁盤(pán)的配額。 What should you do?該如何做? A、 Use 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 DriveT

24、ype and TotalSize properties of the DriveInfo class. E、 Use 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

25、memberships.Which technique should you use? 你正在為一個(gè)控制臺(tái)應(yīng)用程序?qū)懸粋€(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)indo

26、ws用戶 8、 Question 8 You are as the application developer at 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

27、 result in the runtime assigning an unauthenticated principal 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 accomplish the task. 選擇那段代碼可以實(shí)現(xiàn)。 A、 AppDomain domain=AppDomain.CurrentDomain; domain.SetPrincipalPolicy(PrincipalPolicy.Window

28、sPrincipal) B、 AppDomain domain=AppDomain.CurrentDomain; domain.SetThreadPrincipal(new WindowsPrinipal(null)); C、 AppDomain domain=AppDomain.CurrentDomain; domain.SetAppDomainPolicy(PolicyLevel.CreateAppDomainLevel()); D、 AppDomain domain=AppDomain.CurrentDomain; domain.SetPrincipalPolicy(Pri

29、ncipalPolicy.UnauthenticatedPrincipal); 點(diǎn)評(píng):AppDomain 表示應(yīng)用程序域,它表示一個(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 Even

30、tLogPermission=New EventLogPermission(PermissionState.Unrestricted) PermitOnly //C# EventLogPermission e=new EventLogPermission(PermissionState.Unrestricted); PermitOnly(); A、e.RevertPermitOnly B、CodeAccessPermission.RevertPermitOnly C、e.RevertAll D、CodeAccessPermission.RevertAll E、e.Reve

31、rtDeny F、CodeAccessPermission.RevertDeny 點(diǎn)評(píng):CodeAccessPermission類 定義了一個(gè)所有代碼訪問(wèn)權(quán)限的底層結(jié)構(gòu) System.Security.CodeAccessPermission 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 networ

32、k socket connections to computers on the Hi-Tech. network. 你在Hi-Tech 做應(yīng)用程序開(kāi)發(fā)員。在工作上有了新的要求,需要?jiǎng)?chuàng)建一個(gè)類庫(kù),將打開(kāi)網(wǎng)絡(luò)套接字連接上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 segme

33、nt; 該類庫(kù)必須部署到全局程序集緩存,授予完全信任。為配合正在使用的網(wǎng)絡(luò)套接字連接,你開(kāi)發(fā)如下的代碼段: SocketPermission permission=new SocketPermission(PermissionState.Unrestricted); permission.Assert(); You discover though that there are certain existing applications which do not have the required permissions to open the network socket conne

34、ctions. You decide to cancel the assertion. Choose the code segment which will accomplish this task. 你發(fā)現(xiàn),雖然有一些現(xiàn)有的應(yīng)用程序不具有所需的權(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):Soc

35、ketPermission C和D不正確。 B 是對(duì)permission.Deny()方法的操作。 11、 question 11 You work as an application developer at Cer-Tech.. 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

36、 loaded into the child application domain have the same permissions as the applications that are accessed across the local 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=

37、new Evidence(new object[]{SecurityZone.Intranet},null); AppDomain.CreateDomain(“ChildDomain”,childEvidence); B、 Use the following code to create the child application domain: AppDomain.CreateDomain(“ChildDomain”,SecurityZone.Intranet); C、 Use the following code to create the child application do

38、main: AppDomain domain=new AppDomain(“ChildDomain”,SecurityZone.Intranet); D、 Use the following code to create the child application domain: Evidence childEvidence=new Evidence(new object[]{SecurityZone.Intranet},null); AppDomain domain=new AppDomain(“ChildDomain”,childEvidence); 點(diǎn)評(píng):Evidence(證據(jù)

39、) 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è)枚舉,定義與安全策略所使用的安全區(qū)域相對(duì)應(yīng)的整數(shù)值。(System.Security) AppDomain.CreateDomain(“字符串”,Evidence對(duì)象); 參數(shù)一:域的友好名稱 參數(shù)二:System.Security.Policy.Evidence 12、 Question 12 You work as the applicati

40、on 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ā)人員。你創(chuàng)建了一個(gè)將實(shí)現(xiàn)Class01類的代碼片段。如下: MyMethod function. public class Class01 { public int MyMethod(int arg) { return arg; } } You want the Class01

41、.MyMethod function to be dynamically called from a separate class within the assembly. 你希望Class01.MyMethod方法是動(dòng)態(tài)的從本程序集的另外一個(gè)類中調(diào)用。 Choose the code segment which you should use to accomplish the task.. 選擇能夠完成上述任務(wù)的代碼段。 A、 Class01 myClass=new Class01(); Type t=typeof(Class01); MethodInfo m=t.GetMeth

42、od(“MyMethod”); int i=(int)m.Invoke(this,new object[]{1}); B、 Class01 myClass=new Class01(); Type t=typeof(Class01); MethodInfo m=t.GetMethod(“MyMethod”); int i=(int)m.Invoke(myClass,new object[]{1}); C、 Class01 myClass=new Class01(); Type t=typeof(Class01); MethodInfo m=t.GetMethod(“Class0

43、1.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(this,new object[]{1}); 點(diǎn)評(píng):反射 A和D不正確,因?yàn)樵诹硗庖粋€(gè)類過(guò)反射讀取Class01中MyMethod的方法。Invoke的第一個(gè)參數(shù)是要反射的類的實(shí)例。 C不正確,GetMethod(“方法名”),不需要加類名的限定符。 13、 Questio

44、n 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. You must write the code segment that will require the common language runtime(CLR) to grant the assembly a permission set,as though the assembly was

45、 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-Tech 做應(yīng)用程序開(kāi)發(fā)人員。你正在開(kāi)發(fā)一個(gè)現(xiàn)有的應(yīng)用程序,而且必須加載一個(gè)新的程序集到該程序中。雖然這個(gè)程序集加載自本地intranet,你必須編寫(xiě)代碼段使得公共語(yǔ)言運(yùn)行時(shí)(CLR)授權(quán)給程序集一個(gè)權(quán)限集。你必須確保給程序集提供的默認(rèn)證據(jù)被重寫(xiě),并且創(chuàng)建一個(gè)新的證據(jù)集。 Ch

46、oose the code segment which will accomplish this task. A、 Evidence evidence=new Evidence(Assembly.GetExecutingAssembly().Evidence); GetExecutingAssembly()獲取當(dāng)前執(zhí)行代碼的程序集 Evidence獲取此程序集的證據(jù) B、 Evidence evidence=new Evidence(); evidence.AddAssembly(new Zone(SecurityZone.Intranet)); 將指定的程序集證據(jù)添加到程序集

47、C、 Evidence evidence=new Evidence(); evidence.AddHost(new Zone(SecurityZone.Intranet)); 將主機(jī)提供的指定證據(jù)添加到程序集 D、 Evidence evidence=new Evidence(AppDomain.CurrentDomain.Evidence); 點(diǎn)評(píng):定義組成對(duì)安全策略決策的輸入的一組信息,無(wú)法繼承此類。 System.Security.Policy Evidence是一個(gè)集合,它持有一組表示證據(jù)的對(duì)象。該類有兩個(gè)與證據(jù)源(主機(jī)證據(jù)和程序集證據(jù))對(duì)于的集合。 Host evide

48、nce由主機(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 only user names and group memberships. You want to b

49、e 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ù),用于存儲(chǔ)用戶名和組在數(shù)據(jù)庫(kù)中。用戶數(shù)據(jù)庫(kù)非常簡(jiǎn)單,只存儲(chǔ)用戶名和組成員。你希望在自定義用戶數(shù)據(jù)庫(kù)的應(yīng)用

50、程序基礎(chǔ)上使用命令聲明遠(yuǎn)程Blob存儲(chǔ)命令。下面那些類滿足你的要求并能有效的實(shí)現(xiàn)?(選擇多項(xiàng)) A、 GenericIdentity B、 GenericPrincipal C、 IIdentity D、 IPrincipal 點(diǎn)評(píng): System.Security.Principal.GenericIdentity 表示一般用戶 System.Security.Principal.GenericPrincipal System.Security.Principal.IIdentity System.Security.Principal.IPrincipal 15、 Qu

51、estion 15 You work as the application developer at Hi-Tech.. You are creating a new code segment which 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 c

52、ontext, which should be used for the authorization checks like IsInRole. To authorize the user, you 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(!TestPa

53、ssword(username,password)) Throw new Exception(“user not authenticated”); String[]userRolesArray=LookupUserRoles(userName); (判斷該用戶名和密碼是否是認(rèn)證用戶。如果不是就拋出一個(gè)異常;否則讀取該用戶的角色復(fù)制該一個(gè)字符串?dāng)?shù)組) From the options below,choose the code which will make the code segment complete. 從下面的選項(xiàng)中,選擇正確的代碼: A、 GenericIdentity

54、ident=new GenericIdentity(userName); GenericPrincipal currentUser=new GenericPrincipal(ident,userRolesArray); Thread.CurrentPrincipal=currentUser; B、 WindowsIdentity ident=new WindowsIdentity(userName); WindowsPrincipal currentUser=new WindowsPrincipal(ident); Thread.CurrentPrincipal=currentUse

55、r; C、 NTAccount userNTName=new NTAccount(userName); GenericIdentity ident=new GenericIdentity(userNTName.Value); GenericPrincipal currentUser=new GenericPrincipal(ident,userRolesArray); Thread.CurrentPrincipal=currentUser; D、 IntPtr token=IntPtr.Zero; Token=LogonUserUsingInterop(username,encry

56、ptedPassword); WindowsImpersonationContext ctx=WindowsIdentity.Impersonate(token); 點(diǎn)評(píng):GenericIdentity GenericPrincipal WindowsIdentity(System.Security.Principal) NTAcount 用戶或組的賬戶類 16、 Question 16 You work as an application developer at Cer-Tech.. Cer-Tech has asked you

57、 to create an application that copies file content from one file on a client computer named XXYYinc-WS007 to a new file an a server named Server01. 你在Cer-Tech 做應(yīng)用程序開(kāi)發(fā)人員。Cer-Tech 讓你實(shí)現(xiàn)一個(gè)應(yīng)用程序:復(fù)制文件容從客戶端機(jī)器(XXYYinc-WS007)的一個(gè)文件到服務(wù)器端(Server01)的新文件。 The method displayed in the following exhibit is in

58、cluded 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 that the new file does not inherit(繼承) its permissions from the destination(目的地) directory on Server01. What should you do? 下面展示的方法包含在新的應(yīng)

59、用程序中;你必須確保應(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、 Add the following code to the copy method: FileSecurity aci=file1.GetAccessControl(); aci.SetAccessRuleProtection(true,true); //第一個(gè)參數(shù)

60、: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.GetAccessControl(),false); D、 Add the following code to the copy method: FileSecurity aci=file1.GetAccessControl(); aci.SetAccessR

61、uleProtection(true,false); file2.SetAccessControl(aci); 點(diǎn)評(píng):FileSecurity 表示文件的訪問(wèn)控制和審核安全 System.Security.AccessControl.FileSecurity C參數(shù)不正確;A沒(méi)有設(shè)置;D設(shè)置錯(cuò)誤 17、 Question 17 You work as the application developer at Hi-Tech.. You want to modify the current security settings of a file named Data.xml, a

62、s 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 modifications. 你必須防止日后修改繼承的訪問(wèn)規(guī)則。 Choose the code segment which will accomplish the task. 選擇能夠

63、實(shí)現(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 FileSecurity(); security.SetAccessRuleProtection(true,true); File.SetAccessControl(“Dat

64、a.xml”,security); C、 FileSecurity security=File.GetAccessControl(“Data.xml”); security.SetAccessRuleProtection(true,true); D、 FileSecurity security=File.GetAccessControl(“Data.xml”); security.SetAuditRuleProtection(true,true); File.SetAccessControl(“Data.xml”,security); 點(diǎn)評(píng):FileSecurity Access

65、ControlSections(枚舉) 指定要保存或加載安全性說(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 utilize(利用/采用) a database to store the user accounts and group membership data. You need to e

66、nsure 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 membership. 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)角色安全?

展開(kāi)閱讀全文
溫馨提示:
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ì)自己和他人造成任何形式的傷害或損失。

最新文檔

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!