Ping in .NET?

  • Thread starter Thread starter Kenny Rymes
  • Start date Start date
K

Kenny Rymes

Hello

What I want to do is a fast ping to google.com if the connection to my
webservice fails. If ping to google fails, the connection is bad, if it
succeeds our server is down...

How can I ping to google?

Thanks

Kenny
 
The easiest technique I've seen is to use DNS.GetHostEntry. If the ping
address doesn't resolve to 127.0.0.1, you have a good ping.
 
Thanks

This is working if I am using WLAN, but if I have connected my device with
ActiveSync with Passthrough-internet (IExplorer ist working!), I get error
message ...

Any hint?

Thanks

Kenny

Sergey Bogdanov said:
See Alex Feinman's sample:
http://www.alexfeinman.com/download.asp?doc=ping.zip


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Kenny said:
Hello

What I want to do is a fast ping to google.com if the connection to my
webservice fails. If ping to google fails, the connection is bad, if it
succeeds our server is down...

How can I ping to google?

Thanks

Kenny
 
What error message (Exception?) did you get?

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Kenny said:
Thanks

This is working if I am using WLAN, but if I have connected my device with
ActiveSync with Passthrough-internet (IExplorer ist working!), I get error
message ...

Any hint?

Thanks

Kenny

Sergey Bogdanov said:
See Alex Feinman's sample:
http://www.alexfeinman.com/download.asp?doc=ping.zip


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Kenny said:
Hello

What I want to do is a fast ping to google.com if the connection to my
webservice fails. If ping to google fails, the connection is bad, if it
succeeds our server is down...

How can I ping to google?

Thanks

Kenny
 
Hi

I get a messagebox:

Failed to ping. Error code: 6

Then I get 3 times Error code 87...




Sergey Bogdanov said:
What error message (Exception?) did you get?

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Kenny said:
Thanks

This is working if I am using WLAN, but if I have connected my device
with ActiveSync with Passthrough-internet (IExplorer ist working!), I get
error message ...

Any hint?

Thanks

Kenny

Sergey Bogdanov said:
See Alex Feinman's sample:
http://www.alexfeinman.com/download.asp?doc=ping.zip


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Kenny Rymes wrote:
Hello

What I want to do is a fast ping to google.com if the connection to my
webservice fails. If ping to google fails, the connection is bad, if it
succeeds our server is down...

How can I ping to google?

Thanks

Kenny
 
Back
Top