473,320 Members | 2,112 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,320 software developers and data experts.

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

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
same problem. i did all possible things like reboot the machine ect.
but same problem i getting.... here what i did in my machine.config
file......

<defaultProxy>
<proxy
usesystemdefault = "false"
proxyaddress="http://proxyserver:port" -> here i have
putted my proxy address.
bypassonlocal="true"
/>
</defaultProxy>
same setting i did in web.config but same result....
can you help me where i was wrong or any other prob.

nikelsh
Nov 23 '05 #1
2 23149
Hi Niklesh,

You need to set the proxy property on the web service proxy class that you
generated with add-web-refernce. That takes a proxy class as follows:

wsp webserviceproxy = new wsp(); /// whatever you called your web service
proxy;

if (mySettings.NeedToUseProxyServer == true)
webserviceproxy.proxy = new WebProxy();

This should make it take the defaults you set up in your machine config.
Alternately, you can set the name of the proxy server and credentials
directly on the WebProxy constructor if you need to.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: ni***********@rediffmail.com (niklesh)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: The underlying connection was closed: The remote name could not be
resolved
Date: 17 Dec 2004 03:05:17 -0800
Organization: http://groups.google.com
Lines: 24
Message-ID: <65**************************@posting.google.com >
NNTP-Posting-Host: 202.81.205.3
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1103281517 16416 127.0.0.1 (17 Dec 2004
11:05:17 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Fri, 17 Dec 2004 11:05:17 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!news-out.cwi
x.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed. fjserv.net!news.maxwell.sy
r.edu!postnews.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8161
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

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
same problem. i did all possible things like reboot the machine ect.
but same problem i getting.... here what i did in my machine.config
file......

<defaultProxy>
<proxy
usesystemdefault = "false"
proxyaddress="http://proxyserver:port" -> here i have
putted my proxy address.
bypassonlocal="true"
/>
</defaultProxy>
same setting i did in web.config but same result....
can you help me where i was wrong or any other prob.

nikelsh

Nov 23 '05 #2
Hi Dan,

I had the same error while using add-web-reference function in VS.NET.
However, I get "The underlying connection was closed: The remote name could
not be resolved " error when I was still in "Add Web Reference" dialog. I
could navigate to WSDL interface definition at left panel, but because of
the error, the "Add Reference" button at right panel was disabled.
Therefore, I was unable to add web services to my project. No "proxy class"
was generated. This means that I can't apply your suggestion below.

I am behind firewall trying to consume web service on Internet. My IE is
set to use proxy server. I set my machine.config file the same way as
Nikelsh did. I rebooted my machine after change. However, I still am
getting this error.

Do you have any suggestions?

Ching-yeh

"Dan Rogers" <da***@microsoft.com> wrote in message
news:MK**************@cpmsftngxa10.phx.gbl...
Hi Niklesh,

You need to set the proxy property on the web service proxy class that you
generated with add-web-refernce. That takes a proxy class as follows:

wsp webserviceproxy = new wsp(); /// whatever you called your web service
proxy;

if (mySettings.NeedToUseProxyServer == true)
webserviceproxy.proxy = new WebProxy();

This should make it take the defaults you set up in your machine config.
Alternately, you can set the name of the proxy server and credentials
directly on the WebProxy constructor if you need to.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: ni***********@rediffmail.com (niklesh)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: The underlying connection was closed: The remote name could not be resolved
Date: 17 Dec 2004 03:05:17 -0800
Organization: http://groups.google.com
Lines: 24
Message-ID: <65**************************@posting.google.com >
NNTP-Posting-Host: 202.81.205.3
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1103281517 16416 127.0.0.1 (17 Dec 2004
11:05:17 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Fri, 17 Dec 2004 11:05:17 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!news-out.cwi x.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed. fjserv.net!news.maxwell.sy r.edu!postnews.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8161
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

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
same problem. i did all possible things like reboot the machine ect.
but same problem i getting.... here what i did in my machine.config
file......

<defaultProxy>
<proxy
usesystemdefault = "false"
proxyaddress="http://proxyserver:port" -> here i have
putted my proxy address.
bypassonlocal="true"
/>
</defaultProxy>
same setting i did in web.config but same result....
can you help me where i was wrong or any other prob.

nikelsh

Nov 23 '05 #3

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

Similar topics

0
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...
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...
3
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...
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...
0
by: marina.sukhnev | last post by:
Hi guys, I have some issue. Recently we moved our servers to different location and ip addressed have changed,now we started to use dsn everywhere. I have an existing web service that uploads...
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...
0
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...
3
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...
0
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...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.