|
-
Jun 26th, 2007, 10:22 AM
#1
Thread Starter
Lively Member
check for service
Hi
i should execute code to check for services available of upnp service available and running or not
for this
public ServiceController[] services;
services = System.ServiceProcess.ServiceController.GetService(strSysName);
foreach (ServiceController service in services)
{
if (service.Status.ToString() == "Running")
{
if (service.ServiceName == "upnphost")
{
UpnpSystems.Items.Add(strSysName);
break;
}
}
}
but it is affecting system performance as service is getting whole services and i am checking each and every service.
instead i should find for the availability of upnp system
it is much affecting performance as i am accessing network systems around 100
please help in this regard
regards
Vinay Kumar
-
Jun 27th, 2007, 10:12 AM
#2
Hyperactive Member
Re: check for service
You could just check to see if port 1900 is open.
-
Jun 27th, 2007, 10:14 AM
#3
Thread Starter
Lively Member
Re: check for service
How can i implement this
can u please explain me in detail
Thanks for the reply
regards
Vinay
-
Jun 27th, 2007, 10:51 PM
#4
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|