如何在asp.net c#中使用客户端证书访问soap webservice

时间:2013-12-17 15:51:27

标签: c# asp.net

我有一个使用basicHttpBinding的WCF服务。现在我想保护我的方法,以便没有人可以创建代理并使用我的方法。我使用了msdn的WCF客户端认证。但是不能再进一步了。这是我的web.config

1 个答案:

答案 0 :(得分:0)

An SO post on calling a service with a client certificate解释了您需要了解的一些内容。当然,这主要是从客户的角度出发,但它显示并解释了您可能需要的一些内容。

同时查看应该有用的another SO post from the WCF service's perspective - 特别是the answer解释......

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; // Assuming your BasicHttpBinding instance is called "binding".
(服务器和客户端)(两者)都需要

....

最后,为了深入了解仅接受某些客户端证书(我认为 ),请查看更详细的helpful blog post