Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7.1.1 Ping

I am writing an app to connect to a third party application using REST web services.

I have a configuration page that asks for an IP, Port, User Name & Password, currently it just blindly assumes you enter the correct details and attempts a connection.

I want to create a test routine that goes through and checks off the following steps when setting up the config information

  1. Is the IP/Hostname correct (using ping or something)
  2. Is the Port correct
  3. Is the Username & Password correct

then displays the results on screen as it's going so that if it can't connect to the service it's easier to identify where the issue is.

To achieve step 1 I would like to use Ping or some equivalent that does not rely on a particular port being open. So I can eliminate dodgy DNS or a typo in the IP/Hostname.

I understand from previous questions asked that ping wasn't possible in 7.0 but with Mango the sockets classes have been added in, is it possible now, if so how? If it still isn't possible is there a different way I can achieve step 1?

like image 275
Matt Avatar asked Dec 10 '25 02:12

Matt


1 Answers

For 1) and 2) you can definately do with the Mango SDK. There is a App by Microsoft Research called TestMyNet (search in Marketplace or look here: http://research.microsoft.com/en-us/projects/testmynet1/) which does this and more.

For 3) you can listen to the HTTP respose (e.g. Access denied errors).

I will post some code for 1) and 2) later on, if I manage.

like image 67
Jasper Avatar answered Dec 12 '25 18:12

Jasper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!