Answer: We can check whether IIS manager is running or not using ServiceController class as:-
using System;
using System.ServiceProcess;
ServiceController sc = new ServiceController("W3SVC");
Response.Write(sc.Status.ToString());
Asked In: Many Interviews |
Alert Moderator