This is probably a related question, except it’s in Android: How to check WiFi is pass through web page login?
Anyway, my issue is that I need to detect whether the user on my WP7 app is connecting to an access point that requires web authentication. The access point would not provide any Internet connectivity if the user has not authenticated himself.
Is there any way I can detect such a situation? Or perhaps redirecting the user to the access point’s authentication webpage before proceeding with the app flow would be nice too!
I’m currently using WCF Data Services btw.
What I did was to make a HttpWebRequest to the service, and see if it starts off with
xmlnsusing the.Contains()method. If the call is redirected to the WiFi hotspot, then it will return a HTTP response, which is inherently different in nature.I know this might not be the best of solutions, but it works for me to simply test reachability.