WSE 3.0 - > WCF安全令牌

时间:2012-11-12 15:04:24

标签: wcf security wcf-binding wcf-security wcf-client

我有一个WSE 3.0客户端,当前的实现是:

System.Security.Cryptography.X509Certificates.X509Certificate2 cert = new System.Security.Cryptography.X509Certificates.X509Certificate2(path, password);
Microsoft.Web.Services3.Security.Tokens.X509SecurityToken cerToken = new Microsoft.Web.Services3.Security.Tokens.X509SecurityToken(cert);
Microsoft.Web.Services3.Security.MessageSignature cerSig = new Microsoft.Web.Services3.Security.MessageSignature(cerToken);
client.RequestSoapContext.Security.Tokens.Add(cerToken);
client.RequestSoapContext.Security.Elements.Add(cerSig);

如何在WCF中执行此操作?

0 个答案:

没有答案