单项选择题
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.
点击查看答案
相关考题
-
单项选择题
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 -
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.YouhavebeengiventhetaskofdevelopingaWindowsserviceapplicationthatregularlymonitorsotherWindowsservicesonthesamecomputer.ThisWindowsserviceapplicationmustalsologanyabnormalfilesystemactivity.YouhaveaddedthefollowingclasstotheWindowsserviceapplication:publicclassEnumerateService:ServiceBase{publicstaticEnumerateService(){this.ServiceName="EnumerateService";this.CanStop=true;}protectedoverridevoidOnStart(string[]args){//EnumerateallservicesandinitializetheFileSystemWatcher}protectedoverridevoidOnStop(){//StoptheFileSystemWatcherandperformcleanup}publicstaticvoidMain(){EnumerateServiceservice=newEnumerateService();}}YouthencreatetheinstallerfortheWindowsserviceapplication,andinstalltheWindowsserviceapplication.YouhaveconfiguredtheWindowsserviceStartuptypetoAutomatic,andrebootedthesystem.YouthentestthenewWindowsserviceapplication,andfindthatitisnotworking.Youneedtoensurethattheserviceisworkingproperly.Whatshouldyoudo?()
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); -
单项选择题
You work as an application developer at Certkiller .com. You have recently created a Windows service application and need to define a Windows service class. What should you do?()
A.A
B.B
C.C
D.D
