I've seen this asked here and everywhere lots of times but I can't get my head around it.
Here's what I want to do. I need to host a WCF Service in IIS 6. I want user name / password security and I don't want these passed unencrypted so I'm using HTTPS. I have this working all locally on my IIS, but when I come to deploy it I get the anonymous access not enabled error. On my local IIS anonymous access is enabled, on the deployed server it isn't, and we don't want to enable it. Problem understood. Solution not obvious to me....
If I navigate to the page in IE, or do add service reference from Visual Studio, I get this error after entering my username / password. So this shows that my certificate and HTTPS is working OK, and the username and password are correct. Here are the relevant settings from web.config:
<services>
<service name="SecureWcfTestsApplication.Service1">
<endpoint address=""
binding="wsHttpBinding"
bindingConfiguration ="Binding2"
contract="SecureWcfTestsApplication.IService1" />
</service>
</services>
<bindings>
<basicHttpBinding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="Binding2">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="Windows" algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
I am using wsHttpBinding because it didn't like basicHttpBinding with clientCredentialType set to Windows. Having said that I'd rather use basicHttp but it wants UserName as the clientCredentialType, and I'm not sure what the difference is between UserName and Windows security.
Best
Ray