护理学专业知识

单选题You work as an application developer at Certkiller .com. You have been given the task of developing a Windows service application that regularly monitors other Windows services on the same computer. This Windows service application must also log any ab

题目
单选题
You work as an application developer at Certkiller .com. You have been given the task of developing a Windows service application that regularly monitors other Windows services on the same computer. This Windows service application must also log any abnormal file system activity. You have added the following class to the Windows service application: public class EnumerateService : ServiceBase { public static EnumerateService () { this.ServiceName = "Enumerate Service"; this.CanStop = true; } protected override void OnStart (string[] args) { // Enumerate all services and initialize the FileSystemWatcher } protected override void OnStop () { // Stop the FileSystemWatcher and perform cleanup } public static void Main () { EnumerateService service = new EnumerateService(); } } You then create the installer for the Windows service application, and install the Windows service application. You have configured the Windows service Startup type to Automatic, and rebooted the system. You then test the new Windows service application, and find that it is not working.You need to ensure that the service is working properly. What should you do?()
A

 Override the OnBoot method instead of the OnStart method.

B

 Replace the Main method code with the following code: EnumerateService service = new EnumerateService (); Service.Run ();

C

 Override the OnLoad method instead of the OnStart method.

D

 Replace the Main method code with the following code: EnumerateService service = new EnumerateService (); Run (service);

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Your company has 1,000 client computers.  You are planning to deploy Windows 7 and a new line-of-business application.   You have the following requirements:   Install the application as part of the standard Windows 7 deployment. Use a single Windows 7 image for the deployment.  The application must be available for use on client computers that are not connected to the network.   You need to ensure that the application is installed on all new client computers.   What should you do?()

  • A、Publish the application by using Group Policy Software Installation.
  • B、Deploy the application by using Windows Server Update Services (WSUS).
  • C、Service an online image of Windows 7 to add the new application.
  • D、Service an offline image of Windows 7 to add the new application.

正确答案:C

第2题:

You recently installed an application on your computer. The application is configured to automatically start. This application might cause your computer to run slower.  You need to prevent the application from auto starting without uninstalling the application.  What should you do?()

  • A、Use the Microsoft Windows Task Manager application to end the task for the application.
  • B、Use the Control Panel application to uninstall the application. Reboot the computer.
  • C、Use the Software Explorer application to disable the application. Reboot the computer.
  • D、Use the Services application to disable the Application Experience service, and then launch the application.

正确答案:C

第3题:

You are developing an application that performs file backups in the background. The background application will host a Windows Communication Foundation (WCF) service and must be active as soon as the machine is running. The background application will not have a user interface. A front-end application will consume the WCF service and will provide the user interface.You need to choose a host environment for the WCF service.Which hosting environment should you choose? ()

A. Microsoft Internet Information Services (IIS) 6.0

B. Windows Process Activation Services (WAS)

C. A Windows Forms application

D. A Windows Service


参考答案:D

第4题:

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.

正确答案:D

第5题:

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. You need to change the security context in which the service runs. The service will be run in context of a non-privileged user on the local computer and present anonymous credentials to any remote server. You are required to set the Account property of the ServiceProcessInstaller class to specify the service account. What should you do?()

  • A、Use ServiceAccount.User.
  • B、Use ServiceAccount.LocalService.
  • C、Use ServiceAccount.LocalSystem.
  • D、Use ServceAccount.NetworkService.

正确答案:B

第6题:

You are designing a Windows Azure application.   The application will include services hosted in different geographic locations.  The service locations may change.   You must minimize the cost of communication between services.  You need to recommend an approach for calling the services.  What should you recommend?()

  • A、 Use the Service Management API.
  • B、 Use Windows Azure Table storage.
  • C、 Use Windows Azure Queue storage.
  • D、 Use the Windows Azure AppFabric Service Bus.

正确答案:D

第7题:

You are planning to migrate an existing web application to Windows Azure.  The application consists of an ASP.NET web application and a set of native Win32 Windows Services that provide data to the application by using named pipes. The Windows Services cannot be modified.  You need to recommend a strategy for migrating the application to Windows Azure.  What should you recommend?()

  • A、 Define a Windows CommunicationFoundation (WCF) contract for the services.
  • B、 Deploy each Windows Service to a separate worker role.  Deploy the ASP.NET application to a web role.
  • C、 Deploy the application and Windows Services in a Windows Azure VM role.
  • D、 Upload service binaries to a web role by using the Windows Azure Service Management API.

正确答案:B

第8题:

You work as an application developer at Certkiller .com. Certkiller .com has asked you to develop an application that monitors and controls the activities of a Windows service.You need to use the appropriate class to meet Certkiller .com’s requirements. What should you do?()

  • A、 Use the ServiceBase class.
  • B、 Use the ServiceInstaller class.
  • C、 Use the ServiceManager class.
  • D、 Use the ServiceController class.

正确答案:D

第9题:

Your network contains a server that runs Windows Server 2003 Service Pack 2 (SP2). The server has an application that runs as a service.The application fails intermittently. After each failure, you manually restart the service. You need to ensure that the application starts automatically after a failure. What should you do?()

  • A、From the Services snap-in, modify the Log On settings of the service.
  • B、From the Services snap-in, modify the Recovery settings of the service.
  • C、From the properties of the application executable, set the compatibility mode to Windows 2000.
  • D、From the properties of the application executable, enable the Allow non-administrators to run this program setting.

正确答案:B

第10题:

You are designing a Windows Azure web application.   The application must integrate with on-premise business services.   The business services are running on an on-premise server and cannot be rewritten. The business services are not exposed externally.   You need to recommend an approach for accessing the business services.  What should you recommend?()  

  • A、 Move business service functionality to Windows Azure.
  • B、 Connect to the on-premise server from a custom service in Windows Azure.
  • C、 Create a VPN connection between the application and the on-premise server.
  • D、 Expose the business services to the Windows Azure AppFabricService Bus by using a custom service that configures relay binding.

正确答案:D

更多相关问题