Internet connection present?

  • Thread starter Thread starter ultradiv
  • Start date Start date
U

ultradiv

I have a partly produced VB.NET app that needs to 'know' when the client
machine has an interent connection so that it can connect to a remote
webservice.
Any ideas?

Thanks
Andy
 
Ultradiv,

Yes set it in a try and catch block if it does not connect than there is no
connection to that webservice.

Cor
 
Thanks Cor.
I'll do that
Andy

Cor Ligthert said:
Ultradiv,

Yes set it in a try and catch block if it does not connect than there is no
connection to that webservice.

Cor
 
ultradiv said:
I have a partly produced VB.NET app that needs to 'know' when the client
machine has an interent connection so that it can connect to a remote
webservice.
Any ideas?

In VB2005 you can use My.Computer.Network.IsAvailable, but as the docs
say that only tells you if "a computer is connected to *a* network". In
the long run, with proxies and network topologies and firewalls and so
on, the only sure way to tell if you can connect to a remote webservice
is to Try is and see. I mean, Try it and Catch.
 
Back
Top