[Mono-list] System.Net.NetworkInformation: network availability

Christopher David Howie me at chrishowie.com
Thu Jan 27 02:05:21 EST 2011

On 01/10/2011 03:34 AM, Mattia Vitturi wrote:
> This application needs to recognize if it is working online or offline so on
> my Windows side I added this lines of code:
> var netState = NetworkInterface.GetIsNetworkAvailable();

Are you sure that "GetIsNetworkAvailable()" is answering the right
question?  Perhaps it would be better to test if the application's
server is reachable -- the user may be on *some* network, but still may
not be able to reach the required server.

Chris Howie

If you correspond with me on a regular basis, please read this document:

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5


This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.

More information about the Mono-list mailing list