|
-
Aug 30th, 2005, 01:38 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Checking internet connection
I'm writing an application that will grab data from a database stored on the internet. I need to check if the computer has an active internet connection when the application launches and if not prompt the user to connect.
How do I check if an internet connection is open ?
-
Aug 30th, 2005, 02:11 PM
#2
Re: Checking internet connection
well there isn't just an easy IsConnectedToInternet function, but there are some ways to cover as many bases as possible..
one option is to simply just try to connect to the server, if it fails, alert the user that a connection could not be made, and to check to make sure they are connected to the internet, if the problem persits please check your firewall settings blah blah..."
which actually brings up another point that depending HOW your app connects to get this data, you may run into firewall problems
another method you can try is to simply create a web request to a known webpage that should be available (like microsoft.com, or even your own site if you have one) here is an example
http://www.developerfusion.co.uk/show/3903/
-
Aug 31st, 2005, 02:50 AM
#3
Thread Starter
Hyperactive Member
Re: Checking internet connection
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|