gchq
gchq

Reputation: 1773

Web Service - The Remote name could not be resolved

We have an existing web service that is running fine - recently added another and everything seemed to be OK until the connection was no longer from our own LAN, otherwise it throws..

There was no endpoint listening at http://hasoftware002/HOA3_Service/Service2.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.


System.Net.WebException: The remote name could not be resolved: 'hasoftware002'

It's picking up the server name not the domain name. I've tried to compare everything with the service that works to this but can't find where it's messing up. Any pointers would be appreciated.

Did check that it was not a configuration problem with the client but can't spot anything there either and it's certainly pointing to a domain name not a server name....

Thanks

===================

UPDATE Some of the references in the client config documents are referencing the server name, not the domain name - can edit them and it runs, but updating the service reference just overwrites them again. Head, wall, thud............

Upvotes: 0

Views: 8014

Answers (1)

gchq
gchq

Reputation: 1773

Turns out that the answer was to add this under binding

<security mode="Transport">

Now it picks up the domain name and runs as it should. I spent hours, and hours trying so many things, hope this will help someone else.

Edit - added more context re question

<binding name="BasicHttpBinding_IService1" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
      allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="524288000" maxBufferPoolSize="524288000" maxReceivedMessageSize="524288000"
      messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="32000" maxStringContentLength="8192" maxArrayLength="524288000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="Transport"> '<--------- Add this
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>

Upvotes: 1

Related Questions