Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of all wcf services running on a machine?

Tags:

wcf

How can I to get list of all wcf services running on a machine?

like image 820
Embedd_0913 Avatar asked Dec 04 '22 15:12

Embedd_0913


2 Answers

I know this is a very old question, but just in case someone comes across this and needs an answer, you can get a list of services on a machine using the PerformanceCounterCategory class and getting all of the instances.

var category = new PerformanceCounterCategory("ServiceModelService 3.0.0.0", "machine name");
var instances  = category.GetInstanceNames();

foreach (var instance in instances)
{
    Console.WriteLine(instance);
}
like image 184
Jason Avatar answered Dec 26 '22 04:12

Jason


You cannot - you need to know the services and their endpoints. There's no API to give you all running services on a given machine from the outside.

Marc

like image 32
marc_s Avatar answered Dec 26 '22 04:12

marc_s