Download Ngân hàng câu hỏi trắc nghiệm IT miễn phí
200. Current state of a windows service can be known programmatically. [0.5]
a) True b) False
201. The .Net SDK provides the ______________ class to determine the state of any windows service. [0.5]
a) ServeControl b) ServiceController
202. The _________ method retrieves all the services registered on the local system. [0.5]
a) ObtainServices() b) GetServices()
203. The display name of a windows service is fetched using the _________property. [0.5]
a) DisplayName b) Name
204. The current status of the windows service is obtained using the _______ property. [0.5]
a) GetStatus b) Status
205. The Status property holds an enumerator of the enumeration ServiceControllerStatus. [0.5]
a) True b) False
206. Windows services have user interfaces. [0.5]
a) True b) False
Để tải bản DOC Đầy Đủ thì Trả lời bài viết này, mình sẽ gửi Link download cho
Tóm tắt nội dung:
sed)
Statement 2 is false
213.
Which of the following is/are true regarding the ServiceController class?
[1.0]
a)
The GetServices() method of the ServiceController class is a static method.
c)
The GetServices() method of the ServiceController class is not a static method.
b)
The GetServices() method retrieves all the services registered on the local system.
d)
The GetServices() method retrieves all the services running on the local system.
214.
Statement 1: The GetServices() method returns only one object of the class ServiceController for all services registered on the system.
Statement 2: The GetServices() method returns an array of the ServiceController class where each array element refers to each of the services registered on the system.
[1.0]
a)
Statement 1 is true
c)
Statement 2 is true
b)
Statement 1 is false
d)
Statement 2 is false
215.
The Status property of ServiceController class holds an enumerator of the ServiceControllerStatus enumeration that has ________ options.
[1.0]
a)
Five
c)
Three
b)
Two
d)
Seven
216.
Which of the following would best describe the Running enumerator of the ServiceControllerStatus enumeration?
[1.0]
a)
The Windows service is Running.
c)
The Windows service has been Paused.
b)
The Windows service is Not Running.
d)
None of the above.
217.
Which of the following would best describe the Stopped enumerator of the ServiceControllerStatus enumeration?
[1.0]
a)
The Windows service is Running.
c)
The Windows service has been Paused.
b)
The Windows service is Not Running.
d)
None of the above.
218.
Statement 1: The Source property can contain the text that appears in the source category of the Application log.
Statement 2: The Log property can contain the text that appears in the source category of the Application log.
[1.0]
a)
Statement 1 is true
c)
Statement 2 is true
b)
Statement 1 is false
d)
Statement 2 is false
219.
Statement 1: The EventLog class resides in the namespace System.Diagnostics.
Statement 2: The Log property is used to get or set the Windows event log to which the windows service writes.
[1.0]
a)
Statement 1 is true
c)
Statement 2 is true
b)
Statement 1 is false
d)
Statement 2 is false
220.
Which of the following would describe the Paused enumeration member of the ServiceControllerStatus enumeration?
[1.0]
a)
The Windows service is Running.
c)
The Windows service has been Paused.
b)
The Windows service is Not Running.
d)
None of the above.
221.
Statement 1: The EventLog class of the System.Diagnostics namespace provides interaction with the Windows event logs.
Statement 2: The Log property is used to get or set the name of the windows event log to read or write.
[1.0]
a)
Statement 1 is true
c)
Statement 2 is true
b)
Statement 1 is false
d)
Statement 2 is false
222.
Statement 1: Setting Log property of an object of the EventLog class to Application allows windows service to write to the Application event log.
Statement 2: Setting Log property of an object of the EventLog class to ApplicationEvent allows windows service to write to the Application event log.
[1.0]
a)
Statement 1 is true
c)
Statement 2 is true
b)
Statement 1 is false
d)
Statement 2 is false
223.
Which of the following is/are true regarding the WriteEntry() method of EventLog class?
[1.0]
a)
It is an overloaded method.
c)
It writes the string as the Log entry.
b)
It takes in one string parameter only.
d)
It returns void.
224.
Which of the following statements is/are true regarding the ServiceController class methods?
Statement 1: By calling the Pause() method, a windows service can be made to temporarily stop execution.
Statement 2: By calling the Continue() method, a paused windows service can be made to resume execution.
[1.5]
a)
Statement 1 is true.
c)
Statement 2 is true.
b)
Statement 1 is false.
d)
Statement 2 is false.
225.
Which of the following is/are true?
[1.5]
a)
To report any errors, windows services utilize the event logging architecture of Windows although they do not lack a user interface.
d)
Windows 2000 maintains three different types of logs- the Application log, the Security log and the SystemEvent log.
b)
A windows service can be made to write an error message to a log file when it encounters a problem.
e)
Windows services can write to any of the event logs viewed from the Event viewer.
c)
By default, all windows services write to the system log every time they start and stop.
226.
Which of the following code snippets will enable the windows service to write a custom log event to the Application log of Windows along with logging the filename?
[1.5]
a)
...
EventLog evt = new EventLog();
evt.Log = "App";
evt.Source="Windows Service";
evt.WriteEntry(”Operation Complete!”);
...
c)
...
EventLog evt = new EventLog();
evt.LogProperty = "Application";
evt.Source="Windows Service";
evt.WriteEntry(”Operation Complete!”);
...
b)
...
EventLog evt = new EventLog();
evt.Log = "Application";
evt.Source="Windows Service";
evt.WriteEntry(”Operation Complete!”);
...
d)
...
EventLog evt = new EventLog();
evt.Log = "Application";
evt.Source="Windows Service";
evt.Write(”Operation Complete!”);
...
227.
Which of the following would best describe the StartPending enumerator of the ServiceControllerStatus enumeration?
[1.5]
a)
The Windows service is Running.
d)
The Windows service is Stopping.
b)
The Windows service is Starting.
e)
The Windows service is starting after a pause.
c)
The Windows service is Pausing.
228.
Which of the following would best describe the ContinuePending enumerator of the ServiceControllerStatus enumeration?
[1.5]
a)
The Windows service is Running.
d)
The Windows service is Stopping.
b)
The Windows service is Starting.
e)
The Windows service is starting after a pause.
c)
The Windows service is Pausing.
229.
Which of the following would best describe the StopPending enumerator of the ServiceControllerStatus enumeration?
[1.5]
a)
The Windows service is Not Running.
d)
The Windows service is Stopping.
b)
The Windows service has been Paused.
e)
The Windows service is starting after a pause.
c)
The Windows service is Pausing.
230.
Which of the following would best describe the PausePending enumerator of the ServiceControllerStatus enumeration?
[1.5]
a)
The Windows service is Not Running
d)
The Windows service is Stopping
b)
The Windows service has been Paused
e)
The Windows service is starting after a pause
c)
The Windows service is Pausing
231.
Which of the following statements is/are true regarding the ServiceController class methods?
Statement 1: By calling the method Stop(), the windows service is stopped but the program does not exit.
Statement 2: By calling the method Start(),the windows service starts if it is not running initially.
[1.5]
a)
Statement 1 is true.
c)
Statement 2 is true.
b)
Statement 1 is false.
d)
Statement 2 is false
232.
Consider the snippet given below:
...
ServiceController[] sers =
ServiceController.GetServices();
foreach(ServiceController s in sers)
{
Console.WriteLine("\nService Name :
{0}",s.DisplayName);
Console.WriteLine("ServiceStatus :
{0}",s.Status);
}
Which of the following is/are true?
[1.5]
a)
The code above will generate an error.
d)
The status of each service in sers object is displayed on the console..
b)
The array object sers contains all the services registered on the local system.
e)
The array object sers contains all the services registered on the remote system.
c)
The display name for each service in sers object is displayed on the console.
233.
Consider a windows service named “FirstWinService”. Its status is to be checked to see if it is running; if it is then it displays the message “The service FirstWinService is running” else it starts the service.
Which of the following is/are true?
[1.5]
a)
if(s.DisplayName==
“FirstWinService”) {
Console.WriteLine("The service {0} is running",s.DisplayName);
}else{
s.Start();
}
c)
if(s.DisplayName==
“FirstWinService”){
if(s.Status ==
System.ServiceProcess.
ServiceControllerStatus.
Running){
Console.WriteLine("The service {0} is
running",s.DisplayName);
}
}
b)
if(s.DisplayName==
“FirstWinService”){
if(s.Status ==
System.ServiceProcess.
ServiceControllerStatus.
Stopped) {
Console.WriteLine("The service {0} is
running",s.DisplayName);
}
else{
s.Start();
}
}
d)
if(s.DisplayName==
“FirstWinService”)
{
if(s.Status ==
System.ServiceProcess.
ServiceControllerStatus.
Running)
{
Console.WriteLine("The service {0} is
running",s.DisplayName);
}
Else
{
s.Start();
}
}
234.
Which of the following is/are the ...