use WCF service method returns The Caller was not authenticated by the service

Asked

Viewed 41 times

0

I have a project with several WCF services compiled, and accessible by another project on the same machine. Now I’m trying to connect to one of these services from another machine. I put the service refence URL, but it asks me for authentication. What should I do to connect to the service? I have all the available methods, but when running the program gives me the authentication error. I have the service on the web.config so:

  <!--Companies Service-->
  <service name="BusinessServicesImplementation.CompaniesService"
           behaviorConfiguration="BusinessServicesImplementation.GeneralServiceBehavior">
    <endpoint address=""
              binding="wsHttpBinding"
              bindingConfiguration="wsHttpTransactionalBinding"
              contract="BusinessServicesImplementation.ICompanyService">
      <identity>
        <dns value="localhost"/>
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>

On the client’s side I have:

<binding name="WSHttpBinding_ICompanyService" transactionFlow="true" />
...
<endpoint address="http://URLEXTERIORÀMÁQUINA/Services/CompaniesService.svc"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ICompanyService"
          contract="CompaniesService.ICompanyService" name="WSHttpBinding_ICompanyService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint> 

In the design of the same machine of the service I have the address at endpoint as localhost, the rest is all the same and has been working for many years (it was done for a long time before I joined the company). How can I fix it? Thanks

  • that machine on which services are hosted uses IIS? Is enabled Anonymous Authentication if it is in IIS?

1 answer

0

Maybe it’s the machine’s firewall that’s preventing incoming requests. Checks which port the service is using and releases it in the Windows firewall.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.