Hi,
I have this code and I want to display all windows services and Web services separately. Is there any extension or any other logic to differentiate this? For example .asmx and .svc extensions will give us web services..
ServiceController[] lFnGetAllServicesInServer(string aStrServer)
{
ServiceController[] lArrObjServiceController = null;
try
System.Security.Principal.WindowsImpersonationContext lObjImpersonationContext = null;
lObjImpersonationContext = ((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate();
lArrObjServiceController = ServiceController.GetServices(aStrServer.Trim());
lObjImpersonationContext.Undo();
return lArrObjServiceController;
}
catch (Exception ex)
Any suggestions please..
Thanks
Sreenath