3

I am trying to configure a WCF service to allow for both Windows/NTLM and Basic Authentication. Unfortunately, given this configuration only Windows/NTLM works and basic authentication fails with an http status code of 401 Unauthorized.

Our IIS 7.5 server is configured to allow for both of these types of authentication. enter image description here

What is wrong with the below configuration that is preventing basic authentication from working?

<wsHttpBinding>
  <binding name="webBinding">
    <security mode="Transport">
      <transport clientCredentialType="Windows" />
      <transport clientCredentialType="Basic" realm="XXX.YYY.com" />
    </security>
  </binding>
</wsHttpBinding>

I have also tried using basicHttpBinding, as a forum post indicated that wsHttpBinding might prevent basic authentication if WCF felt the password was being passed in clear text.

Community
  • 1
  • 1
ahsteele
  • 26,243
  • 28
  • 134
  • 248
  • Have you installed an HTTP sniffer like Fiddler or Charles or even Wireshark? No? Install one and then post the results. – Aron Jul 07 '14 at 18:42

1 Answers1

0

I would create two end-points one that use Windows credentials and another end-point that uses Basic.

Richard Schneider
  • 34,944
  • 9
  • 57
  • 73
  • Richard I've tried using just basic and have had the same issue. No matter the configuration basic http authentication will not work. – ahsteele Jun 07 '11 at 22:36