Endpoint check for correctness

I have been searching the internet and have not been able to find a solution to my problem.

I want to be able to check the correctness and availability of a WCF service through a passed in endpoint. So the user inputs an endpoint (it changes a lot) and I want to be able to make sure it is valid by some form of ping or check.

I have been looking at MSDN but it does not seem to do what I am looking for.

Answers


You could set the OpenTimeout of your clients binding to a reasonable short time and call your clients Open() method.

If the service is not there/answering, you will get a System.ServiceModel.EndpointNotFoundException. Or your service could implement a "Ping()" method, that gives you a sensible result you can check, and call this "Ping()" without calling Open() first. So you can check availability and correctness with one call.


You could download excellent example from IDesign site (the writer of 'Programming WCF Services')

Here is the link: iDesign

Take a look on 'Ad-hoc Discovery' and 'Metadata Explorer'


Need Your Help

WPF: how to alignment 2 labels in different sizes

wpf alignment label

I have simple Grid with 2 label, one of them get its value (0-100) from Slider Value and i want this 2 labels show me the Slider Value in this format:

Android activity navigation save state

android android-fragments navigation state

In the main activity ActivityA I replace FragmentA by fragment FragmentB. From FragmentB the user can start a new activity ActivityB. By hitting the back button in ActivityB, ActivityA is displayed