473,397 Members | 1,950 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,397 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 23154
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.