Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2005

Tip: Looking for answers? Try searching our database.

Determine Internet Connection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brett Robichaud - 13 Jan 2005 00:25 GMT
This may be an obvious/stupid question, but I was unable to google an
answer.

How can I tell if an Internet connection is available?  My app cannot count
on a connection always being there and before I start a ftp or http request
I want to check for basic connectivity.
Steven Cheng[MSFT] - 13 Jan 2005 03:21 GMT
Hi Brett,

Thanks for your posting. As for the question you mentioned I think there're
serveral means we can do and generally the following two are ok:

1. If you want to check whether your client machine is online or OFFline,
you can consider using some WIN32 api to detect the network status, you can
have a look at the .net's smart client offline application block to see how
it works:

#Smart Client Offline Application Block
http://msdn.microsoft.com/library/en-us/dnpag/html/offline.asp?frame=true

2. If what you want to detect is a particular remote url or site, you can
consider using the HttpWebRequest class to send a simple get request the
the destination url. If that remote service is asseccible you'll get some
info such as success or fail status code.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Brett Robichaud - 13 Jan 2005 17:48 GMT
Thanks, the Smart Client App Block should have what I'm after.

-Brett-

> Hi Brett,
>
[quoted text clipped - 27 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Steven Cheng[MSFT] - 14 Jan 2005 01:02 GMT
You're welcome Brett,

Enjoy the SCAB :)

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.