WCF says my settings require anonymous authentication, but I don't want them

So this question has the same symptoms of my problem.

Security settings for this service require "anonymous" authentication, but it is not enabled for the IIS application that hosts this service.

However, I removed the mex endpoint from my web configuration and I still get the same error. My web configuration is as follows:

 <system.serviceModel> <services> <service name="xxx.MessageHub.MessageHubService" behaviorConfiguration="default"> <endpoint binding="wsHttpBinding" contract="xxx.MessageHub.IMessageHubService" /> </service> </services> <behaviors> <endpointBehaviors> </endpointBehaviors> <serviceBehaviors> <behavior name="default"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceAuthorization principalPermissionMode="UseWindowsGroups" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="credsOnly"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows"></transport> </security> </binding> </basicHttpBinding> <wsHttpBinding> <binding name="transport"> <security mode="Transport"> <transport clientCredentialType="Windows"></transport> </security> </binding> </wsHttpBinding> </bindings> </system.serviceModel> 

I run an application with IIS6 compatibility, adding to IIS7 (because our prod servers start IIS6 - I get the same exception when deploying to a test server).

What settings do I need to fix to make this material work?

0
authentication wcf
Dec 21
source share
1 answer

I was able to fix this by following the steps found in this msdn post , slightly modified:

  • Right-click the WCF Web.config file for the WCF service, and then click Change WCF Configuration .
  • In the configuration editor, under "Configuration", select the Bindings folder.
  • In the "Bindings" section, select New Binding Setting .
  • In the Create New Binding dialog box, select wsHttpBinding . Click OK.
  • Set the name of the binding configuration to some logical and recognizable name; e.g. WsHttpEndpointBinding .
  • Click the Security tab.
  • Set Mode to Transport by selecting this option from the drop-down menu.
  • Set TransportClientCredentialType to Ntlm by choosing this option from the drop-down list.

  • In the Configuration section, select WsHttpEndpoint .
  • Set the BindingConfiguration parameter to WsHttpEndpointBinding by selecting this option from the drop-down list. This binds the binding configuration setting to the binding.

  • In the configuration editor, on the File menu, click Save.

And (as far as I know) this provides authentication using integrated authentication (but not for Windows).

0
Dec 21 '11 at 18:07
source share
β€” -



All Articles