How to disable authentication schemes for WCF Data Services

Posted by Schneider on Stack Overflow See other posts from Stack Overflow or by Schneider
Published on 2010-03-30T00:18:58Z Indexed on 2010/03/30 0:23 UTC
Read the original article Hit count: 769

When I deployed my WCF Data Services to production hosting I started to get the following error (or similar depending on which auth schemes are active):

IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.

Apparently WCF Data Services (WCF in general?) cannot handle having more than once authentication scheme active.

OK so I am aware that I can disable all-but-one authentication scheme on the web application via IIS control panel .... via a support request!!

Is there a way to specify a single authentication scheme on a per-service level in the web.config?

I thought this might be as straight forward as making a change to <system.serviceModel> but... it turns out that WCF Data Services do not configure themselves in the web config. If you look at the DataService<> class it does not implement a [ServiceContract] hence you cannot refer to it in the <service><endpoint>...which I presume would be needed for changing its configuration via XML.

P.S. Our host is using II6, but both solutions for IIS6 & IIS7 appreciated.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about ado.net-data-services