單項(xiàng)選擇題

You work as an application developer at Certkiller .com. Certkiller .com has asked you to develop an application allows administrators to control Windows services dynamically without using the Services MMC. 
You start by creating a class named LocalServiceController. You need to add the correct code to the LocalServiceController class to ensure that administrators are able to start local Windows services.What code should you use?()



 

A.A
B.B
C.C
D.D

題目列表

你可能感興趣的試題

單項(xiàng)選擇題

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);

微信掃碼免費(fèi)搜題