You are developing a class library that will open the network socket connections to computers on the network. You will deploy the class library to the global assembly cache and grant it full trust. You write the following code to ensure usage of the socket connections. SocketPermission permission = new SocketPermission(PermissionState.Unrestricted); permission.Assert(); Some of the applications that use the class library might not have the necessary permissions to open the network socket connections.You need to cancel the assertion. Which code segment should you use?()A、CodeAccessPermission.RevertAssert();B、CodeAccessPermission.RevertDeny();C、permission.Deny();D、permission.PermitOnly();
You are developing a class library that will open the network socket connections to computers on the network. You will deploy the class library to the global assembly cache and grant it full trust. You write the following code to ensure usage of the socket connections. SocketPermission permission = new SocketPermission(PermissionState.Unrestricted); permission.Assert(); Some of the applications that use the class library might not have the necessary permissions to open the network socket connections.You need to cancel the assertion. Which code segment should you use?()
- A、CodeAccessPermission.RevertAssert();
- B、CodeAccessPermission.RevertDeny();
- C、permission.Deny();
- D、permission.PermitOnly();
相关考题:
You are creating a class that performs complex financial calculations.The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate.You write serialized representations of the class.You need to write a code segment that updates the currRate variable with the current interest ratewhen an instance of the class is deserialized.Which code segment should you use?()A.B.C.D.
You develop a Web control. The Web control consists of labels and associated text boxes.You need to ensure that the Web control has both toolbox and visual designer support. What should you do?() A. Add a Web Control Library project to your solution. Define a class that inherits from CompositeControl.B. Add a Windows Control Library project to your solution. Define a class that inherits from UserControl.C. Add a Web User Control to your project. Define a class that inherits from UserControl.D. Add a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl.
You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.)01 [ServiceContract()]02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]03 public Class LibraryService04 {05 public Book GetBookByTitle(string title)06 {07 ...08 }0910 [WebGet(UriTemplate = Book/{id})]11 public Book GetBookById(string id)12 {13 ...14 }15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()A. [WebGet(UriTemplate = Book/{title})]B. [WebGet(UriTemplate = BookByTitle/{title})]C. [WebGet(UriTemplate = Book/{titleToSearch})]D. [WebGet(UriTemplate = {titleToSearch})]
You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms Application.The ServiceHost instance is created in the Form Constructor.You need to ensure that the service is not blocked while the UI thread is busy.What should you do?()A. Decorate the service implementation class with the following line of code [ServiceBehavior(UseSyncronizationContext = false)]B. Decorate the service implementation class with the following line of code [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]C. Call the Invoke method of the form and supply a delegate.D. Call the BeginInvoke method of the form and supply a delegate.
You work as an application developer at Certkiller .com. Certkiller .com has been hired by a small local private school to develop a class library that will be used in an application named ManageAttendance for the purpose of managing student records.You are responsible for developing this class library. Certkiller .com has instructed you to create a collection in the application to store learners’ results. The school has informed you that they currently only have seven learners, but that this value will triple in the following year. Due to the limited resources, you need to ensure that the collection you create consumes a minimum amount of resources. What should you use to create the collection?()A、 The HybridDictionary collection class.B、 The HashTable collection class.C、 The ListDictionary collection class.D、 The StringCollection collection class.
You write a procedure that will be called from two level triggers and a database trigger. Where should you store this code? ()A、On the Oracle server. B、Locally in each form module. C、In an attached PL/SQL library D、On your file network server.
You want to provide a tool that allows users quick access to form modules, by listing them in an Explorer-style interface. Which reusable component do you use?()A、ActiveX controls B、Calendar Class C、Standard Object Library D、Picklist Class E、Wizard Class F、Navigator Class
You develop a Web control. The Web control consists of labels and associated text boxes. You need to ensure that the Web control has both toolbox and visual designer support. What should you do?()A、Add a Web Control Library project to your solution. Define a class that inherits from CompositeControl.B、Add a Windows Control Library project to your solution. Define a class that inherits from UserControl.C、Add a Web User Control to your project. Define a class that inherits from UserControl.D、Add a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl..
You are developing an ASP.NET Dynamic Data Web application. Boolean fields must display as Yes or No instead of as a check box. You replace the markup in the default Boolean field template with the following markup.You need to implement the code that displays Yes or No. Which method of the FieldTemplateUserControl class should you override in the BooleanField class?()A、OnLoadB、ConstructC、OnDataBindingD、SaveControlState
You are developing a Windows Presentation Foundation (WPF) application The application is for commercial use and requires a valid license key to be entered. You create a project type of Class Library code to validate license keys You need to ensure that the user enters a valid license key during installation of the software. Which deployment should reference the class library?()A、Click OnceB、Setup ProjectC、XBAPD、XCopy
You are creating a Windows Forms application by using the .NET Framework 3.5.You plan to deploy the application in multiple countries and languages.You need to ensure that the application meets the globalization requirements. Which two actions should you perform?()A、Handle server names and URLs as ASCII dataB、Use Unicode strings throughout the applicationC、Use the NumberFormatInfo class for numeric formattingD、Handle strings as a series of individual characters instead of entire stringsE、Avoid usage of the SortKey class and the CompareInfo class for sorting purposes
You need to call an unmanaged function from your managed code by using platform invoke services. What should you do?()A、Create a class to hold DLL functions and then create prototype methods by using managed code.B、Register your assembly by using COM and then reference your managed code from COMC、Export a type library for your managed code.D、Import a type library as an assembly and then create instances of COM object.
You are developing a class library. Portions of your code need to access system environment variables. You need to force a runtime SecurityException only when callers that are higher in the call stack do not have the necessary permissions. Which call method should you use?()A、set.Demand();B、set.Assert();C、set.PermitOnly();D、set.Deny();
You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms Application.The ServiceHost instance is created in the Form Constructor.You need to ensure that the service is not blocked while the UI thread is busy. What should you do?()A、Decorate the service implementation class with the following line of code [ServiceBehavior(UseSyncronizationContext = false)]B、Decorate the service implementation class with the following line of code [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]C、Call the Invoke method of the form and supply a delegate.D、Call the BeginInvoke method of the form and supply a delegate.
You are creating an assembly named Assembly1.Assembly1 contains a public method. The global cache contains a second assembly named Assembly2.You must ensure that the public method is only called from Assembly2.Which permission class should you use?()A、GacIdentity PermissionB、Publisher Identity PermissionC、Data Protection PermissionD、Strong Name Identity Permission
You work as an application developer at Certkiller .com. Certkiller .com has been contracted to develop an application for the local bank.You have been given the responsibility of creating this application and need to store each transaction record, which is identified using a complex transaction identifier,in memory. The bank informs you that the total amount of transaction records could reach 200 per day. To achieve this, you decide to utilize one of the existing collection classes in the .NET 2.0 class library. You need to ensure that you the collection class you select is the most efficient one for storing transaction records.What should you do?()A、 Select the ListDictionary collection class.B、 Select the HashTable collection class.C、 Select the Queue collection class.D、 Select the StringCollection collection class.
You work as an application developer at Certkiller .com. Certkiller .com has instructed you to create a class named MetricFormula. This class will be used to compare MetricUnit and EnglishUnit objects.The MetricFormula is currently defined as follows (Line numbers are used for reference purposes only): 1. public class MetricFormula2. { 3. 4. } You need to ensure that the MetricFormula class can be used to compare the required objects. What should you do? ()A、 Add the following code on line 1: : IComparable {B、 Add the following code on line 1: : IComparer {C、 Add the following code on line 3: public int Compare (object x, object y) {// implementation code }D、 Add the following code on line 3: public int CompareTo (object obj) {// implementation code }
You work as an application developer at Certkiller .com. You are required to dynamically load assemblies into an application domain. You are using the Load method of the AppDomain class. What types of files can you this use method for?()A、 Library application files (.dll).B、 All assembly files, no matter what there file extensions are.C、 Application configuration files (.config).D、 Standalone application files (.exe).
You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 03 public Class LibraryService 04 { 05 public Book GetBookByTitle(string title) 06 { 07 ... 08 } 09 10 [WebGet(UriTemplate = "Book/{id}")] 11 public Book GetBookById(string id) 12 { 13 ... 14 } 15 }Library patrons want the ability to search the catalog by title.You need to ensure that the GetBookByTitle method is exposed as a service method.Which code segment should you insert at line 04?()A、[WebGet(UriTemplate = "Book/{title}")]B、[WebGet(UriTemplate = "BookByTitle/{title}")]C、[WebGet(UriTemplate = "Book/{titleToSearch}")]D、[WebGet(UriTemplate = "{titleToSearch}")]
You are planning to deploy Windows 7 to all client computers in your network. You need to ensure that domain administrators can manage domain Group Policy objects (GPOs) from their Windows 7 computers. What should you provide to the domain administrators?()A、Administration Tools PackB、GPOAccelerator ToolC、Local Group Policy EditorD、Remote Server Administration Tools
You work as the application developer at Certkiller .com. Certkiller .com uses Visual Studio.NET 2005 as its application development platform. You are developing a .NET Framework 2.0 Windows Service application and are busy writing the following installation code for the Windows service: Public Class TestServiceInstaller Implemets Installer 'Additional code to go here End Class You are required to install the Windows service and write the values associated with the service in the Windows Registry. What should you do?()A、The Assembly Registration Tool (Regasm.exe) should be used.B、The Global Assembly Cache Tool (Gacutil.exe) should be used.C、The .NET Services Installation Tool (Regsvcs.exe) should be used.D、The Installer Tool (InstallUtil.exe) should be used.
All client computers in your network run Windows XP. Some of the computers are part of a secure network. Some of the computers connect to the network by using virtual private networking (VPN). You are planning to deploy Windows 7. You have the following requirements: Use a dedicated server for deployment. Use a single operating system image for deployment. Ensure that you can use removable media to deploy the image. Ensure that you can select which applications are installed onto a client computer at the time of deployment. You need to design a deployment strategy that meets the requirements. What should you do?()A、 Using a Windows PE boot media, use ImageX to apply the image from a network share to the client computers.B、 Use System Center Configuration Manager 2007 R2 to perform a zero-touch installation.C、 Use the Microsoft Deployment Toolkit to perform a lite-touch installation.D、 Use Windows Deployment Services on a network server to deploy Windows 7 by using an install image.
You are developing a Windows Presentation Foundation (WPF) application. You are implementing a test strategy for the application. You need to ensure that the test class can repeat user input. From which base class should the test class inherit?()A、AutomationElementIdentifierB、AutomationPeerC、KeyboardD、UICues
单选题You work as the application developer at Certkiller .com. Certkiller .com uses Visual Studio.NET 2005 as its application development platform. You are developing a .NET Framework 2.0 Windows Service application and are busy writing the following installation code for the Windows service: Public Class TestServiceInstaller Implemets Installer 'Additional code to go here End Class You are required to install the Windows service and write the values associated with the service in the Windows Registry. What should you do?()AThe Assembly Registration Tool (Regasm.exe) should be used.BThe Global Assembly Cache Tool (Gacutil.exe) should be used.CThe .NET Services Installation Tool (Regsvcs.exe) should be used.DThe Installer Tool (InstallUtil.exe) should be used.
单选题You write a procedure that will be called from two level triggers and a database trigger. Where should you store this code? ()AOn the Oracle server. BLocally in each form module. CIn an attached PL/SQL library DOn your file network server.
单选题You want to provide a tool that allows users quick access to form modules, by listing them in an Explorer-style interface. Which reusable component do you use?()AActiveX controls BCalendar Class CStandard Object Library DPicklist Class EWizard Class FNavigator Class
多选题You are creating a Windows Forms application by using the .NET Framework 3.5.You plan to deploy the application in multiple countries and languages.You need to ensure that the application meets the globalization requirements. Which two actions should you perform?()AHandle server names and URLs as ASCII dataBUse Unicode strings throughout the applicationCUse the NumberFormatInfo class for numeric formattingDHandle strings as a series of individual characters instead of entire stringsEAvoid usage of the SortKey class and the CompareInfo class for sorting purposes