The remote name could not be resolved RRS feed

  • Question


    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";

                    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);


    My Configuration file


         <compilation debug="true"/>
        <authentication mode="Windows"/>

            <binding name="HttpSoap11Binding">
              <textMessageEncoding messageVersion="Soap11"/>
              <httpTransport useDefaultWebProxy="true" transferMode="Buffered"/>

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

    Any help is highly appreciated.

    Tuesday, March 18, 2008 9:57 AM