1

如何配置 WCF 以使用带有客户端证书的 HTTP(无 ssl)?

在服务方面,我尝试了以下方法:

<bindings>
            <basicHttpBinding>
                <binding name="binding1">
                    <security mode="TransportCredentialOnly">
                        <transport clientCredentialType="Certificate"></transport>
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings

但它抱怨说:

Certificate-based client authentication is not supported in TransportCredentialOnly security mode. Select the Transport security mode. 

谢谢,

4

2 回答 2

0

I don't think I fully understand your question.

If you want to configure the security on you binding (basicHttpBinding) to use a client certificate (to authenticate the client) the only way to do this on http as far as I know is to use message security, you can find an example in the wcf samples.

As stated by the resulting exception and also on a Distributed Services Support Team blog:

Note: With the TransportCredentialOnly mode, you cannot use Certificate-based client authentication: Certificate-based client authentication is not supported in TransportCredentialOnly security mode.

于 2012-12-14T13:25:56.560 回答
0

我从您的问题中了解到,您想使用尚未由 CA(证书颁发机构)颁发的自定义证书。

在这种情况下,您需要在服务器上安装相同的,如果您在 .NET 中使用它们,它们也需要在 IIS 中附加到您的网站。

希望这有效

于 2012-12-14T13:30:05.503 回答