473,325 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

VB.net 2003/2005- Can't figure out how to test for working internet connection

I've been trying to figure out how to test for a valid internet connection.
I am able to connect to a valid internet connection, but when it drops, or
if it is not there when my program starts, I get an exception.

This probably is a newbie question, but I do not even know what or how I
would trap that error.
Oct 12 '06 #1
4 1549
Look into Ping
http://msdn2.microsoft.com/en-us/lib...ng(VS.80).aspx

just ping a known ip address and see if it is reachable.
"adalton" <ad*****@newsdalton.comwrote in message
news:eg*********@news1.newsguy.com...
I've been trying to figure out how to test for a valid internet
connection.
I am able to connect to a valid internet connection, but when it drops, or
if it is not there when my program starts, I get an exception.

This probably is a newbie question, but I do not even know what or how I
would trap that error.

Oct 12 '06 #2
On 12 Oct 2006 13:58:42 GMT, adalton <ad*****@newsdalton.comwrote:
>I've been trying to figure out how to test for a valid internet connection.
I am able to connect to a valid internet connection, but when it drops, or
if it is not there when my program starts, I get an exception.

This probably is a newbie question, but I do not even know what or how I
would trap that error.

I ran across this article the other day which you may find useful:
http://www.codeproject.com/vb/net/CC...atePackage.asp

Gene
Oct 13 '06 #3
Hello adalton,

I see people ask this a lot.
Who cares if there is a working internet connection. That doesn't tell you
anything. What you really want to know is, "Does the address I want to reach
exist from this location?". So wrap your connection code in a Try/Catch
block and trap any connection failures.

-Boo
I've been trying to figure out how to test for a valid internet
connection. I am able to connect to a valid internet connection, but
when it drops, or if it is not there when my program starts, I get an
exception.

This probably is a newbie question, but I do not even know what or how
I would trap that error.

Oct 13 '06 #4
And what if the user is behind a Proxy ?? :-)

in most company`s people are behind a connectbox , or proxy so ping is only
possible to the local network

i would go for another aproach i would just request a small test page on my
own server , even better you could also implement a so called heartbeat
a background thread just request a page every few seconds this way you can
even detect problems on the network to your server during transfers

regards

Michel Posseth [MCP]
"Stacey" <St*****@community.nospamschreef in bericht
news:eo**************@TK2MSFTNGP02.phx.gbl...
Look into Ping
http://msdn2.microsoft.com/en-us/lib...ng(VS.80).aspx

just ping a known ip address and see if it is reachable.
"adalton" <ad*****@newsdalton.comwrote in message
news:eg*********@news1.newsguy.com...
>I've been trying to figure out how to test for a valid internet
connection.
I am able to connect to a valid internet connection, but when it drops,
or
if it is not there when my program starts, I get an exception.

This probably is a newbie question, but I do not even know what or how I
would trap that error.


Oct 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Aaron | last post by:
will running visual studio 2003 and visual studio 2005 alongside cause any problems?
14
by: dlangell | last post by:
I have NOT yet made the transition from VB 6 to VB.NET 2003. I know some of the general differences, but I'm not yet to the point where I would feel comfortable starting a new project in .NET. At...
3
by: Rene | last post by:
I just got my copy of VS 2005 and getting ready to install it but I am not sure if the installation of VS 2005 is going to override my 2003 installation. Ideally, I would like to have the two...
0
by: Rich | last post by:
(1) Is there a better place to pose the question below? (2) I am starting to convert my enterprise solution from VS 2003 (.NET v1.1.4322) to VS 2005 Professional (.NET v2.0.50727). The entire...
2
by: Paul Craig | last post by:
Hi everyone, I have recently upgraded several of my projects from Visual Studio 2003 to 2005 and everything went across quite smoothly. The main problem that I am having is I have used SQL Data...
4
by: jmnaste | last post by:
Hi, I tried to migrate data of an Access 2003 application (.mdb) to SQL Server 2005 Express. Using the Wizard and choosing 'create a new database', I receive (a French message saying roughly)...
1
by: =?Utf-8?B?Sks=?= | last post by:
We have a 2003 project but the solution file is 2005! We use the version selector it opens in 2005 but says we have to upgrade to 2005, we open in 2003 but says the solution is a 2005 version ...
1
by: =?Utf-8?B?ZGFuc3Rkb3RuZXQ=?= | last post by:
I've tried to upgrade my existing ASP.NET 2003 app to 2005 and I get a ton of errors. It compiles and runs perfect in 2003 but i get hundreds of errors in 2005. Is there an easier way to upgrade...
5
by: cj | last post by:
In 2003 I had Public Class Form1 Inherits System.Windows.Forms.Form In 2005 I've seen it with and without the Inherits System.Windows.Forms.Form. Is it supposed to be there? I'm wondering...
0
by: Learner | last post by:
Hello, I have converted a VS 2003 project that has few Crsytalreports in it to VS 2005. All the dlls got converted well and my application works well except the Crystalreports part. I have a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.