473,545 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Dim ws As New GetInfoByZIP.US Zip

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.Keep Alive = 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
2 3356
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******** *****@TK2MSFTNG P15.phx.gbl...
Dim ws As New GetInfoByZIP.US Zip

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.Keep Alive = 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1363
by: ashima | last post by:
Hi, I am trying to add a webservice.I provide a reference to the wsdl file on the server. It works fine when I compile the code on my machine. But on the server, I get the above error with the same compiled code. UNDERLYING CONNECTION WAS CLOSED.REMOTE NAME COULD NOT BE RESOLVED. I read some of the articles which indicate a problem with the...
26
16474
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On Win2K3/IIS6.0), do we still need this patch? 2) Does it specifically solve only this error: The underlying connection was closed. An unexpected error
3
3230
by: MattM | last post by:
I am getting the "The underlying connection was closed: Unable to connect to the remote server" message when trying to connect an ASPX page to a simple Hello World web service. I have read a few posts on this topic but my situation is different. The problem appears to be a setting with my test server. The basic scenario is it works when the...
2
23169
by: niklesh | last post by:
Dear all, when i am trying to giving web reference to webservices i am getting above said error.. i tried to find out what is the main problem then i got from microsoft support that i have to config the for proxy because i am trying to access from behind the firewall. i configered my machine.config file for that but still i am getting...
3
4061
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running for long duration (may be more than 4 hours). ...
0
1606
by: RichardH | last post by:
I have a win32 .net app that uses a webservice to access a databse. AOL clients, using dial-up, receive the the exception "The underlying connection was closed. The remote name could not be resolved." Microsoft has posted this error as an issue accessing the web through a proxy server. I know that AOL uses proxy servers and caching but the...
3
2086
by: Monty | last post by:
OK, I had an issue with this and found lots of advice that did not apply, so I'm posting what I found hoping it might help someone else. Here's the sitch: you have a COM app that calls to a .Net assembly which in turn calls a web service. You know the web service is reachable and that the COM app is able to instantiate your .Net assembly...
0
939
by: Harrison2 | last post by:
Hello! I have following problem. I write a self-updating application using Microsoft Application Blocks (Updater). And if I run it on Win XP, I have following error: The underlying connection was closed. The remote name could not be resolved. But when I run it on Windows 2003, it works good.
0
983
by: davidson1 | last post by:
Hai in my Project how to send sms from computer to mobile .... Front-End :- ASP.NET(vb) I am using the following code, but it shows me a ERROR "The underlying connection was closed: The remote name could not be resolved. "
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.