473,231 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

The underlying connection was closed

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 URL is the short server name
(testserver) but fails with the full server name (testserver.abc.com).

Here's a summary of what works and what doesn't:

These Situations Work
* ASPX and Web Service on localhost
* ASPX on localhost / Web Service on test server
* ASPX and Web Service on test server / use short URL (testserver)

This fails with the error message
* ASPX and Web Service on test server / use full URL (testserver.abc.com)

What I can't figure out is what is causing the failure. If I use the FQDN
(ex. testserver.abc.com) the error message happens. If I replace the URL with
the machine name (ex. testserver) then it works fine.

Since this only happens when both the web page and the web service are on
the machine I don't think it's a proxy issue. Everything I read about this
message says it's a proxy issue so I'm lost as to what to research.

Can anyone think of what it may be? I'd at least like to know what to
investigate.

Nov 21 '05 #1
3 3208
Hard code the IP for the URL in the HOSTS file. That might cure the issue.
Also ensure you are using the web service reference correctly, especially if
you wired it yourself.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"MattM" wrote:
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 URL is the short server name
(testserver) but fails with the full server name (testserver.abc.com).

Here's a summary of what works and what doesn't:

These Situations Work
* ASPX and Web Service on localhost
* ASPX on localhost / Web Service on test server
* ASPX and Web Service on test server / use short URL (testserver)

This fails with the error message
* ASPX and Web Service on test server / use full URL (testserver.abc.com)

What I can't figure out is what is causing the failure. If I use the FQDN
(ex. testserver.abc.com) the error message happens. If I replace the URL with
the machine name (ex. testserver) then it works fine.

Since this only happens when both the web page and the web service are on
the machine I don't think it's a proxy issue. Everything I read about this
message says it's a proxy issue so I'm lost as to what to research.

Can anyone think of what it may be? I'd at least like to know what to
investigate.

Nov 21 '05 #2
I don't think this is related to the HOSTS file as I have no problem refering
to the server using the full name (testserver.abc.com). It's only the web
service that has this problem.

One thing to note is that my machine is Win2k and the test server is Win2003.
"Cowboy (Gregory A. Beamer) - MVP" wrote:
Hard code the IP for the URL in the HOSTS file. That might cure the issue.
Also ensure you are using the web service reference correctly, especially if
you wired it yourself.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"MattM" wrote:
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 URL is the short server name
(testserver) but fails with the full server name (testserver.abc.com).

Here's a summary of what works and what doesn't:

These Situations Work
* ASPX and Web Service on localhost
* ASPX on localhost / Web Service on test server
* ASPX and Web Service on test server / use short URL (testserver)

This fails with the error message
* ASPX and Web Service on test server / use full URL (testserver.abc.com)

What I can't figure out is what is causing the failure. If I use the FQDN
(ex. testserver.abc.com) the error message happens. If I replace the URL with
the machine name (ex. testserver) then it works fine.

Since this only happens when both the web page and the web service are on
the machine I don't think it's a proxy issue. Everything I read about this
message says it's a proxy issue so I'm lost as to what to research.

Can anyone think of what it may be? I'd at least like to know what to
investigate.

Nov 21 '05 #3
I think I have an insight here. You say it works when you use the short
name (e.g. local LAN name) for the server. But it fails when you use the
full qualified internet name for the server. In many cases, machines
inside of firewalls are not addressable thru the company's public firewall
- which is where the resolution will take you when you use the full name.
If this is the case, the company's firewall is closing the connection.

Is your test machine addressable from the public internet (e.g. if I went
to my public library and typed in a URL that you gave me for a page on your
test machine, would I get a page, or would your company's firewall prevent
me from hitting that server?

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: The underlying connection was closed
thread-index: AcS8LfgXnDHMQ9sLQKCR2MeE+g6icw==
X-WBNR-Posting-Host: 192.85.47.1
From: "=?Utf-8?B?TWF0dE0=?=" <Ma***@discussions.microsoft.com>
Subject: The underlying connection was closed
Date: Wed, 27 Oct 2004 07:05:09 -0700
Lines: 28
Message-ID: <2E**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7150
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

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 URL is the short server
name
(testserver) but fails with the full server name (testserver.abc.com).

Here's a summary of what works and what doesn't:

These Situations Work
* ASPX and Web Service on localhost
* ASPX on localhost / Web Service on test server
* ASPX and Web Service on test server / use short URL (testserver)

This fails with the error message
* ASPX and Web Service on test server / use full URL
(testserver.abc.com)

What I can't figure out is what is causing the failure. If I use the FQDN
(ex. testserver.abc.com) the error message happens. If I replace the URL
with
the machine name (ex. testserver) then it works fine.

Since this only happens when both the web page and the web service are on
the machine I don't think it's a proxy issue. Everything I read about this
message says it's a proxy issue so I'm lost as to what to research.

Can anyone think of what it may be? I'd at least like to know what to
investigate.
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
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...
5
by: Vijayakrishna Pondala | last post by:
Hi, We are using the following error randomly, when accessing a webservice method/servlet hosted on JBoss application server: The underlying connection was closed: An unexpected error occurred...
4
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's...
2
by: hazz | last post by:
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...
1
by: Tim Reynolds | last post by:
Team, From a windows service, we consume a web service on another server and occasionally receive System.Net.WebException: The underlying connection was closed:. For some clients we call, we do...
3
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...
2
by: =?Utf-8?B?RnJpZWRoZWxtRWljaGlu?= | last post by:
I am consuming continously my own web-services on a localhost client with a rate of perhaps 35 request/response-pairs a minute. I am using "invoke-id=1", so there is at the same time only one...
4
by: =?Utf-8?B?QXJuYXVkIFZpc2N1c2k=?= | last post by:
Hi all, we meet a problem since we use WCF to consume java WebServices. Often the first call works then the second raises the following error : "The underlying connection was closed : " We...
4
by: Sin Jeong-hun | last post by:
I don't get the message so it's hard to debug that, but some of my clients report that they get "The underlying connection was closed unexpectedly" exception. According to this site (http://...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.