WCF The HTTP request is unauthorized with client authentication scheme 'Negotiate'

2.4k views Asked by At

I have a WCF service hosted on IIS with Windows Aut, I am able to connect to the service from my client application (WPF) on my local machine, but when I try to access the service from some other machine I get the following error

The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

I checked the providers in my IIS and there "Negotiate" is the first one and then the "NTLM". I also tried removing "NTLM" but that also did not help.

I have following configuration in my App.config

 <bindings>
 <basicHttpBinding>
        <binding name="BasicHttpBinding" maxReceivedMessageSize="2147483647"
          receiveTimeout="00:30:00" sendTimeout="00:30:00"
          openTimeout="00:10:00" closeTimeout="00:10:00">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="20971520" />
            <security mode="TransportCredentialOnly">
              <transport clientCredentialType="Windows" />
            </security>
        </binding>
  </basicHttpBinding>    

1

There are 1 answers

0
John On

You may need to enable anonymous access in IIS.