单选题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?()ACodeAccessPermission.RevertAssert();BCodeAccessPermission.RevertDeny();Cpermission.Deny();Dpermission.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 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 Comunication Foundation (WCF) service that is used to check the status of orders placed by customers.The following code segment is part of your service.(Line numbers are included for reference only.)01 [ServiceContract]02 public interface IStatus03 {04 [OperationContract]05 int GetOrderStatus(string orderNumber);06 }0708 class OrderService : IStatus09 {10 public int GetOrderStatus(string orderNumber)11 {12 ...13 }14 }1516 class Program17 {18 static void Main(string[] args)19 {202122 host.Open();23 ...24 }25 }You need to ensure that the service always listens at net.pipe://SupplyChainServer/Pipe.What should you do?()A.B.C.D.

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 Service. The Windows Service will host a Windows Communication Foundation (WCF) service.The Windows Service class will inherit from ServiceBase.You need to ensure that the WCF service starts when the Windows Service is restarted.What should you do in the Windows Service class?()A.B.C.D.

You are developing a Windows Presentation Foundation (WPF) application that displays opportunities from ListT.. class named Lead. The Lead class contains the properties Title and Revenue.You add a DataGrid control named dgQualifiedLeads to the MainWindow.xaml file. You set the ItemsSource property to Leads as follows.You need to ensure that CollectionViewSource is used to filter the list to display only Lead objects with revenue ...What should you do ?()A.B.C.D.

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 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 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 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 custom-collection class.You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?()A、The method must return a type of either IEnumerator or IEnumerable.B、The method must return a type of IComparable.C、The method must explicitly contain a collection.D、The method must be the only iterator in the class.

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 are developing a Windows Communication Foundation (WCF) service. You write a method named Submit that accepts messages of the type System.ServiceModel.Channels.Message. You need to process the body of the incoming messages multiple times in the method. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)()A、Use the GetBody method of the Message class to read the content of the messages.B、Use the CreateBufferedCopy method of the Message class to load the messages into memory.C、Use the WriteBodyContents method of the BodyWriter class to make a copy of the messages.D、Use the CreateMessage method of the MessageBuffer class to make a copy of the messages.

You work as an application developer at Certkiller .com. You are developing a collection class named ClientCollection, which is to be used for storing the names of Certkiller .com’s clients that are situated in various geographical areas. These client names are represented by the Client class. You are planning to create a method named SortClients in the ClientCollection class to arrange Client objects in ascending order. You need to ensure that the appropriate interface is implemented by the Client class to allow sorting.What interface should be used?()A、 IDictionaryB、 IComparableC、 IComparerD、 IEqualityComparer

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 developing a Windows Presentation Foundation (WPF) application. You need to use XAML to create a custom control that contains two Button controls. From which base class should you inherit? ()A、FrameworkElementB、UIElementC、UserControlD、Button

单选题You create a package that contains PL/SQL variables that must be shared among several forms in the Travel application. You place the package in a library and attach the library to all the forms that need to share the data. Which parameter in the OPEN_FORM built-in must you set to ensure that changes made by one form are visible to the other forms in the application?()Adata_mode Bparamlist Cquery_mode Dsession_mode

单选题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 developing a Windows Communication Foundation (WCF) service that contains the following service contract.[ServiceContract( )]public interface IPaymentService{ [OperationContract( )] void RecordPayments(Person person);}public class Person{ ... }public class Employee : Person{ ... }public class Customer : Person{ ... }You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object. What should you do?()AAdd the following KnownType attribute to the Employee class and to the Customer class. [KnownType(GetType(Person))]BImplement the IExtensibleDataObject interface in the Person class.CImplement the IExtension(ofType(T)) interface in the Person class.DAdd the following KnownType attributes to the Person class. [KnownType(GetType(Employee))] [KnownType(GetType(Customer))]

单选题Which object is added to a form module when you copy the reusable calender class?()AList icon BObject group CPL/SQL library DKey-Listval trigger

单选题You work as an application developer at Certkiller .com. You are developing an application that makes use of a Queue class object named MyQueue. This Queue class object will be used to store messages sent by the user during application run time. The application that you are developing provides an interface for administrators and an interface for users to create message reports.You want to ensure that all user messages stored in the MyQueue object are removed when an administrator selects the reset option.What should you do?()A Use the Enqueue method of the MyQueue object.B Use the Clear method of the MyQueue object.C Use the Dequeue method of the MyQueue object.D Use the TrimToSize method of the MyQueue object.

单选题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?()AOnLoadBConstructCOnDataBindingDSaveControlState

单选题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 Windows Service application which contains three different Windows services. You are required to only set one Windows service to start automatically when the system is restarted. What should you do?()AUse the ServiceController class.BUse the ServiceBase class.CUse the ServiceProcessInstaller class.DUse the ServiceInstaller class.

单选题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?()AAutomationElementIdentifierBAutomationPeerCKeyboardDUICues

单选题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?()Aset.Demand();Bset.Assert();Cset.PermitOnly();Dset.Deny();

单选题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?()AAdd a Web Control Library project to your solution. Define a class that inherits from CompositeControl.BAdd a Windows Control Library project to your solution. Define a class that inherits from UserControl.CAdd a Web User Control to your project. Define a class that inherits from UserControl.DAdd a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl.