Is this another bug with the WP7 emulator?
Saturday, April 10, 2010 3:07 PM
I think I might have found another but with the WP7, is the NetworkInterface.GetIsNetworkAvailable supposed to always return false?
Yesterday I was playing around with my app for Ottawa IT Day and well, I thought, hhhmm what happens if you're on your WP7 BUT you don't have network access.....What happens to all those web page calls? After scratching my very thinning head of hair, I realized there HAS to be a way to check the network access. And BINGO, there it was, NetworkInterface.GetIsNetworkAvailable().
The thing is, when I use it in the WP7 emulator, it always returns me back false, BUT all the network calls work. hhhmmm is it lying to me?
Why is the NetworkInterface.GetIsNetworkAvailable() returning me back false when I AM connected to the internet. hhhmmm maybe I'm doing something wrong, so off to a Silverlight app I go. hhhmmmm works there.
So I guess I have found a bug with the WP7 emulator. I'm sure it'll get fixed soon. Until then, I think I will continue to use this, but have to figure out a way around the fact that it's lying to me. Now it's time to grab a coffee and get coding.
MSDN: NetworkInterface.GetIsNetworkAvailable Method
WP7 Forums posting