|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to test internet connection in VB.NET?Hello,
I have an application that runs continously gives an error and stops working if the internet goes down (which happens for about 5-10 minutes several times a day. Can anybody tell me how to test for internet connectivity when this happens and then pause processing until internet connectivity is back up? Thanks. On Tue, 30 May 2006 15:12:02 -0700, John Riddle wrote:
> I have an application that runs continously gives an error and stops working Open a connection to a server garanteed to be up 24/7 such as> if the internet goes down (which happens for about 5-10 minutes several times > a day. Can anybody tell me how to test for internet connectivity when this > happens and then pause processing until internet connectivity is back up? microsoft.com, apple.com or google.com. If the connection succeeds, your Internet connection is up. If it fails, you might want to try out another site first before declaring that the connection has been lost though. Thanks guys. Tried Mehdi's response and it worked great.
Thanks. Try Show quoteHide quote "Mehdi" wrote: > On Tue, 30 May 2006 15:12:02 -0700, John Riddle wrote: > > > I have an application that runs continously gives an error and stops working > > if the internet goes down (which happens for about 5-10 minutes several times > > a day. Can anybody tell me how to test for internet connectivity when this > > happens and then pause processing until internet connectivity is back up? > > Open a connection to a server garanteed to be up 24/7 such as > microsoft.com, apple.com or google.com. If the connection succeeds, your > Internet connection is up. If it fails, you might want to try out another > site first before declaring that the connection has been lost though. > "John Riddle" <JohnRid***@discussions.microsoft.com> wrote in message Maybe shell 'ping' and see what happens?news:7E3CF9A1-F411-4A73-972F-F7D8567500DE@microsoft.com... > I have an application that runs continously gives an error and stops > working > if the internet goes down (which happens for about 5-10 minutes several > times > a day. Can anybody tell me how to test for internet connectivity when this > happens and then pause processing until internet connectivity is back up? John,
Try the first IP next after your router. http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ping.aspx http://msdn2.microsoft.com/en-us/library/he5sca5t.aspx I hope this helps, Cor Show quoteHide quote "John Riddle" <JohnRid***@discussions.microsoft.com> schreef in bericht news:7E3CF9A1-F411-4A73-972F-F7D8567500DE@microsoft.com... > Hello, > > I have an application that runs continously gives an error and stops > working > if the internet goes down (which happens for about 5-10 minutes several > times > a day. Can anybody tell me how to test for internet connectivity when this > happens and then pause processing until internet connectivity is back up? > > Thanks.
Why choose SQL Express over Access?
Anyway To Compress PDF from .NET? Visual Basic 6.0 X Visual Basic 2005 Express VB.NET & SQL Server Connection Example Saving changes to a database Setting the correct tabindex vb.net continuation VB.NET Winforms app + MSWord (for spellcheck)? architecture question: not representing inheritance in the data model A couple of newbie questions |
|||||||||||||||||||||||