By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,151 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,151 IT Pros & Developers. It's quick & easy.

The underlying connection was closed: The remote name could not be resolved.

P: n/a
Dim ws As New GetInfoByZIP.USZip

works great if I have an internet connection on my dev machine.

As soon as I lose or disable my internet connection I get

"The underlying connection was closed: The remote name could not be resolved."

It isn't as simple as just checking to see if ws is null or nothing.

I don't want to utilize the solution I have seen involving webRequest.KeepAlive = False because there is nothing to keep alive. It simply can't get out to the web service.

Any ideas?

Thanks,

-Greg

Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
for now :

catch e as exception

If e.Message = "The underlying connection was closed: The remote name could not be resolved." Then

Exit Function

End If

End try

"hazz" <hazz@sonic_net> wrote in message news:uh*************@TK2MSFTNGP15.phx.gbl...
Dim ws As New GetInfoByZIP.USZip

works great if I have an internet connection on my dev machine.

As soon as I lose or disable my internet connection I get

"The underlying connection was closed: The remote name could not be resolved."

It isn't as simple as just checking to see if ws is null or nothing.

I don't want to utilize the solution I have seen involving webRequest.KeepAlive = False because there is nothing to keep alive. It simply can't get out to the web service.

Any ideas?

Thanks,

-Greg

Nov 23 '05 #2

P: n/a
hB
did not get what you want exactly, but you should have try cath over ws
calls.
(since you cannot control the physical connectivity)

---
hB

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.