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 / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

desperate call for help:  "The underlying connection was closed: Unable to connect to the remote server.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David - 23 Nov 2004 07:23 GMT
I have a web service running on a server.

With my brower, I can get the asmx page and get the expected output on the
page.

With a console application, I can call the webservice and retrieve from it
what I am supposed to retrieve.

Only when an ASP.NET application calls the web service, do I get the "the
underlying connection was closed:  Unable to connect to the remote server"
error message.

The only relevent msdn page
(http://support.microsoft.com/default.aspx?scid=kb;en-us;819450) isn't very
helpful.  It says MS has confirmed it as a bug, and says to contact them
for a fix!!!!  And there might be a charge!  ARE YOU KIDDING ME?

The last time I contacted them, it was like talking to a wall.

Thanks.  Any help would be greatly appreciated.
Dan Rogers - 23 Nov 2004 21:53 GMT
Hi David,

Have you tried setting the proxy-side keep alives to "false"?  This may
remedy the situation.  

Dan Rogers
Microsoft Corporation
--------------------
>From: "David" <spammersgohome@spammersgohome.com>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
>Subject: desperate call for help:  "The underlying connection was closed:
Unable to connect to the remote server.
>Lines: 22
>X-Priority: 3
[quoted text clipped - 7 lines]
>X-Complaints-To: abuse@rr.com
>X-Trace: twister.socal.rr.com 1101194638 67.52.118.62 (Mon, 22 Nov 2004
23:23:58 PST)
>NNTP-Posting-Date: Mon, 22 Nov 2004 23:23:58 PST
>Organization: RoadRunner - West
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwi
x.com!newsfeed.cwix.com!news.umass.edu!arclight.uoregon.edu!hammer.uoregon.e
du!logbridge.uoregon.edu!tethys.csu.net!newshub.sdsu.edu!elnk-nf2-pas!elnk-p
as-nf1!newsfeed.earthlink.net!cyclone.socal.rr.com!cyclone2.kc.rr.com!news2.
kc.rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26763
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 18 lines]
>
>Thanks.  Any help would be greatly appreciated.
David - 27 Nov 2004 02:50 GMT
Is that a IIS setting?

Do you mean HTTP Keep-Alives enabled?  I tried that and it still does not
work.

> Hi David,
>
[quoted text clipped - 53 lines]
>>
>>Thanks.  Any help would be greatly appreciated.
Dan Rogers - 29 Nov 2004 20:17 GMT
Hi David,

No, not on the IIS side.  On the proxy side.  In the proxy that was
generated when you did an add-web-reference, there is a setting that
governs when/if the proxy requests a keep alive.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
>From: "David" <spammersgohome@spammersgohome.com>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
>References: <iABod.101790$Kl3.62295@twister.socal.rr.com>
<R5Xshba0EHA.1952@cpmsftngxa10.phx.gbl>
>Subject: Re: desperate call for help:  "The underlying connection was
closed: Unable to connect to the remote server.
>Lines: 70
>X-Priority: 3
[quoted text clipped - 7 lines]
>X-Complaints-To: abuse@rr.com
>X-Trace: twister.socal.rr.com 1101523839 67.52.118.62 (Fri, 26 Nov 2004
18:50:39 PST)
>NNTP-Posting-Date: Fri, 26 Nov 2004 18:50:39 PST
>Organization: RoadRunner - West
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
sfeed1.ip.tiscali.net!news.glorb.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-
nf1!newsfeed.earthlink.net!cyclone.socal.rr.com!cyclone2.kc.rr.com!news2.kc.
rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26825
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 30 lines]
>>>Organization: RoadRunner - West
>>>Path:

cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwi

x.com!newsfeed.cwix.com!news.umass.edu!arclight.uoregon.edu!hammer.uoregon.e

du!logbridge.uoregon.edu!tethys.csu.net!newshub.sdsu.edu!elnk-nf2-pas!elnk-p

as-nf1!newsfeed.earthlink.net!cyclone.socal.rr.com!cyclone2.kc.rr.com!news2.
>> kc.rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail
>>>Xref: cpmsftngxa10.phx.gbl
[quoted text clipped - 22 lines]
>>>
>>>Thanks.  Any help would be greatly appreciated.
geetha - 18 Feb 2005 11:12 GMT
 Hi...
   I have faced the same kind of problem when using a webservice in .net.
I am able to solve this by adding some proxy settings in web.config

<system.net>
<defaultProxy>
<proxy
usesystemdefault = "false"
bypassonlocal="false"
proxyaddress="http://address:port"
/>
</defaultProxy>
</system.net>

This code should be added in web.config but not in between
<system:web></system:web> tags

Hope this may help you

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.