Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27064

VS 2010 Asynchronous web request to check for internet connectivity.

$
0
0
I've been trying to work on this using various online sources for about 6 hours and can't get my head around it.

I'm building a Windows 8 phone application using VS2012 and simply trying to send a request to a URL and receive back a response to identify whether or not we have internet connectivity. So far, I call the following subroutine:


PHP Code:

Sub intnow()

        
Dim uri As New System.Uri("http://www.aol.com")
        
Dim request As WebRequest WebRequest.Create(uri)
        
request.BeginGetResponse(AddressOf FinishWebRequestrequest)

End Sub 

I then have a subroutine called FinishWebRequest within which I am expecting a response. I simply don't know where to go from here. How do I parse the HTTP response? Ps: I have to use BeginGetResponse as it is the only method Windows 8 supports in this class.

Many Thanks,
Jordan

Viewing all articles
Browse latest Browse all 27064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>