How to check Check Whether IIS is Running or Not?

 Posted by Vishalneeraj-24503 on 3/1/2015 | Category: ASP.NET Interview questions | Views: 2044 | Points: 40
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 

Comments or Responses

Login to post response