pHi all
pHow can I find that user is connected to internet or not?
pthanks in advance
p>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
An exception indicates that the site isn't reachable thus probably there is
no internet connection (ms site could be down as well, but that is not as
probable).
--
Regards, Peter
"Michael Nemtsev" <nemtsev@msn.co mskrev i meddelandet
news:1799a79b3a efaf8c8aceaa382 3c53@msnews.mic rosoft.com...
sample
pHi all
pHow can I find that user is connected to internet or not?
pthanks in advance
p---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour
>
"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche
>
>
This will tell you only if you are connected to something (network, dialup,
wireless etc), not whether the internet is contactable. The best bet is to
try and do what you want to do and handle any exceptions, or try and open
something like google for microsoft to check for connectivity.
HTH
Ciaran O'Donnell
"Peter Thornqvist" wrote:
Is there an equivalent to InternetCheckCo nnection in .Net? If not, why not
interop it?
>
Here's another alternative:
>
using System.Net;
>
HttpWebRequest request =
(HttpWebRequest )WebRequest.Cre ate(@"http://www.microsoft.c om");
>
>
An exception indicates that the site isn't reachable thus probably there is
no internet connection (ms site could be down as well, but that is not as
probable).
>
>
--
Regards, Peter
>
"Michael Nemtsev" <nemtsev@msn.co mskrev i meddelandet
news:1799a79b3a efaf8c8aceaa382 3c53@msnews.mic rosoft.com...
sample
pHi all
pHow can I find that user is connected to internet or not?
pthanks in advance
p---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche
You can also handle events with network availability at
System.Net.Netw orkInformation. NetworkChange.N etworkAvailabil ityChanged
and you can ping webserver to check for connectivity too.
System.Net.Netw orkInformation. Ping
HTH
Ciaran O'Donnell
"perspolis" wrote:
Hi all
How can I find that user is connected to internet or not?
>
thanks in advance
>
>
>
Comment