This is a repost from CLR, doesn't seem like there is much activity over
on that list.  This isn't really all too advanced though, so I apologize
in advance.  ;)

Using the system.ServiceProcess.ServiceController I'm getting some odd
values back.

Basically if I pull up a list of services on a remote machine, there are
several services that consistently report the wrong status back.  Some
others however report correctly.

For instance.... I do:

        If myService.Status <> ServiceControllerStatus.Running Then
            Throw New Exception("Service was not running")
        End If


If I run that for the service "Server", which is running, it throws an
exception.

If I run for "Alerter" it reports correctly that it is running.

Checking "Computer Browser" also throws an exception even though it too is
running.

Anyone know of any rhyme or reason for what is going on here?  On the
remote machine I am a full administrator.  Just using the Services MSC
console I can pull up the list of all the services on the remote machine
and view statuses and/or start and stop them just fine.

Any thoughts?
=Blain


This communication is for use by the intended recipient and contains
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

 Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

            http://www.DuPont.com/corp/email_disclaimer.html

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to