WCF - Autenticação do Windows - Configurações de segurança exigem anonimato
Eu estou lutando duro com o serviço WCF em execução no IIS em nosso servidor. Após a implementação, acabo com uma mensagem de erro:
As configurações de segurança para este serviço exigem a autenticação 'Anônima', mas ela não está habilitada para o aplicativo IIS que hospeda esse serviço.
Eu quero usar a autenticação do Windows e, portanto, tenho acesso anônimo desativado. Observe também que há aspNetCompatibilityEnabled (se isso fizer alguma diferença).
Aqui está o meu web.config:
<code><system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> <bindings> <webHttpBinding> <binding name="default"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" proxyCredentialType="Windows"/> </security> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="AspNetAjaxBehavior"> <enableWebScript /> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="defaultServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceAuthorization principalPermissionMode="UseWindowsGroups" /> </behavior> </serviceBehaviors> </behaviors> <services> <service name="xxx.Web.Services.RequestService" behaviorConfiguration="defaultServiceBehavior"> <endpoint behaviorConfiguration="AspNetAjaxBehavior" binding="webHttpBinding" contract="xxx.Web.Services.IRequestService" bindingConfiguration="default"> </endpoint> <endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange"></endpoint> </service> </services> </system.serviceModel> </code>
Eu procurei por toda a internet sem sorte. Qualquer pista é muito apreciada.