Results 1 to 4 of 4

Thread: check for service

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    91

    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

  2. #2
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    354

    Re: check for service

    You could just check to see if port 1900 is open.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    91

    Re: check for service

    How can i implement this


    can u please explain me in detail


    Thanks for the reply

    regards
    Vinay

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width