Re: Check for internet connection

Stephen Bub <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <LISTSERV%[email protected]>
Which status code?  HTTPWebRequest.GetResponse() returns a WebResponse
which doesn't have a status code.  The WebException has a status property,
but generating a WebException is exactly what I'm trying to avoid.


On Sat, 17 Mar 2007 12:24:03 -0500, Booth, Bill
<[email protected]> wrote:

>How about just doing a HTTPWebRequest and check the status code?
>
>-----Original Message-----
>From: Discussion forum for developers using Windows Forms to build apps
>and controls [mailto:[email protected]] On Behalf Of
>Stephen Bub
>Sent: Saturday, March 17, 2007 1:16 AM
>To: [email protected]
>Subject: [DOTNET-WINFORMS] Check for internet connection
>
>
>Hi,
>I'm using a Web Service, and would like to check if an internet
>connection is available before calling it so I can handle it in a
>user-friendly manner without generating a WebException.  Can anyone tell
>me how to do this?
>
>Yours truly,
>Stephen
>
>The information in this e-mail is confidential, may be legally privileged
and is intended solely for the addressee. If you have received this e-mail
in error, you are hereby notified that any use, distribution, or copying
of this communication is strictly prohibited.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.