473,396 Members | 1,789 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,396 software developers and data experts.

The remote name could not be resolved

I have to connect to a 3rd party XML Web Service outside our LAN by
adding a WCF Service Reference to a web application

When attempting to invoke any of the generated client class methods,
I recieve the following error: System.Net.WebException: The remote name could not be resolved

Iam able to run this Web application from Non Proxy Area.
However unable to run it only in Proxy area.

My Coding
XmlDocument requestXml = new XmlDocument();

string ReqXML = "My XML String";
requestXml.LoadXml(ReqXML);

string webserviceUrl = "my webservice url";
string webserviceAction = "my webservice Action";

CustomBinding customBinding = new CustomBinding();
customBinding = new CustomBinding("HttpSoap11Binding");

ChannelFactory<IRequestChannel> factory = new ChannelFactory<IRequestChannel>(customBinding, webserviceUrl);
IRequestChannel channel = factory.CreateChannel();

Message requestMessage = Message.CreateMessage(customBinding.MessageVersion , webserviceAction, new XmlNodeReader(requestXml));
Message responseMessage = channel.Request(requestMessage);

Response.Write(responseMessage.ToString());


My Configuration file

<configuration>

<appSettings/>
<connectionStrings/>

<system.web>
<compilation debug="true"/>

<authentication mode="Windows"/>
</system.web>

<system.serviceModel>
<bindings>
<customBinding>
<binding name="HttpSoap11Binding">
<textMessageEncoding messageVersion="Soap11"/>
<httpTransport useDefaultWebProxy="true" transferMode="Buffered"/>
</binding>
</customBinding>
</bindings>
</system.serviceModel>

<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\Traces.svclog"/>
</listeners>
</source>
</sources>
</system.diagnostics>
<system.net>
<defaultProxy useDefaultCredentials="true">
</defaultProxy>
</system.net>
</configuration>


Any help is highly appreciated.
Mar 18 '08 #1
1 5074
ashitpro
542 Expert 512MB
I have to connect to a 3rd party XML Web Service outside our LAN by
adding a WCF Service Reference to a web application

When attempting to invoke any of the generated client class methods,
I recieve the following error: System.Net.WebException: The remote name could not be resolved

Iam able to run this Web application from Non Proxy Area.
However unable to run it only in Proxy area.

My Coding
XmlDocument requestXml = new XmlDocument();

string ReqXML = "My XML String";
requestXml.LoadXml(ReqXML);

string webserviceUrl = "my webservice url";
string webserviceAction = "my webservice Action";

CustomBinding customBinding = new CustomBinding();
customBinding = new CustomBinding("HttpSoap11Binding");

ChannelFactory<IRequestChannel> factory = new ChannelFactory<IRequestChannel>(customBinding, webserviceUrl);
IRequestChannel channel = factory.CreateChannel();

Message requestMessage = Message.CreateMessage(customBinding.MessageVersion , webserviceAction, new XmlNodeReader(requestXml));
Message responseMessage = channel.Request(requestMessage);

Response.Write(responseMessage.ToString());


My Configuration file

<configuration>

<appSettings/>
<connectionStrings/>

<system.web>
<compilation debug="true"/>

<authentication mode="Windows"/>
</system.web>

<system.serviceModel>
<bindings>
<customBinding>
<binding name="HttpSoap11Binding">
<textMessageEncoding messageVersion="Soap11"/>
<httpTransport useDefaultWebProxy="true" transferMode="Buffered"/>
</binding>
</customBinding>
</bindings>
</system.serviceModel>

<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\Traces.svclog"/>
</listeners>
</source>
</sources>
</system.diagnostics>
<system.net>
<defaultProxy useDefaultCredentials="true">
</defaultProxy>
</system.net>
</configuration>


Any help is highly appreciated.

I think the problem is with your DNS server.
try substituting 'webserviceUrl' variable with IP address of your server.
If it work then you can be assured of DNS problem.
Or
just try to ping the server with it's host name.
Mar 18 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
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: reda | last post by:
Hi All I develop a web application over local area network. I host a web service on a local web server and I am trying to consume it from another web application hosted on a another web server...
6
by: =?Utf-8?B?Wm9vZG9y?= | last post by:
I have a ClickOnce application that uses web services. This works from every machine we can test it on; however, a customer has a laptop that fails with an exception (relevant portion of stack...
1
by: Nathan Baker | last post by:
Hey, I have an XML file which I am serializing into a class using the following code: // XmlSerializer s = new XmlSerializer(typeof(edition)); StreamReader r = new...
8
by: schaf | last post by:
Hi NG! I have a problem in my remote application. After calling a remote function the calculation will be done by the service. The calculation result will be sent to the caller (client) via...
0
by: vedika | last post by:
hi, I have one c# application through which i connect to web service. web service is SSL protected. when i connect it through secure wireless network it is working well. but when i try to connect...
4
by: =?Utf-8?B?U2hpdmEgUmFtYW5p?= | last post by:
Iam trying to read a RSS feed (through XmlTextReader) from my application. The url (ex: "http://www.wipro.com/RSSFeed.xml") is accessible through the browser but when the same when tried from the...
0
by: sureshmaurya | last post by:
Hi, I have uploaded my site on www.rssfeeds.qsh.eu . but it gives following error while trying to access any remote url. remote name cannot be resolved : www.somesitename.com, Error but it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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,...

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.