I have a WCF service with the following configuration:
I had HTTP 400 issues when consuming a HTTPS mex URL from SvcUtil, eventhough httpsGetEnabled was set to true. The error message was miles away from what was really the issue so I'm posting here in case anyone else stumbles upon the same problem.
I had a self-signed CA certificate (TestRootCA) which was the issuer of the server certificate (localhost). On the client I imported the TestRootCA CER file but I didn't import the CRL (Certificate Revocation List). It seems that when you use a self-signed CA you must also import the CRL, otherwise server authentication fails in strange ways, none of which point you to the real problem. What's worse is that the fail happens during SSL handshake, before the request even reaches your service, so you'll see no errors in WCF trace logs.