使用X.509证书签署Soap信封:ArgumentException(WSE528) [英] Signing Soap Envelopes With X.509 Certificates: ArgumentException (WSE528)

查看:140
本文介绍了使用X.509证书签署Soap信封:ArgumentException(WSE528)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这个论坛类别错误,请移动此主题。

我正在winforms应用程序中实现第三方提供的Web服务界面。通过Soap Requests进行通信。

每个请求必须使用X.509证书进行签名。我的证书颁发者声明我的证书对数字签名完全有效。但是,当我执行以下操作时:


Hi,
if this goes to the wrong forum category, please move this thread.

I'm implementing a 3rd party provided web services interface in my winforms app. The communication is done via Soap Requests.

Every request must be signed with a X.509 Certificate. My certificate issuer states that my certificate is perfectly valid for digital signing. However, when I do the following:


X509Certificate2 cert = new
 X509Certificate2(<initialization parameters>); //The cert details come correctly, so this works

X509SecurityToken signatureToken = new
 X509SecurityToken(cert);

SoapContext requestContext = service.RequestSoapContext;

requestContext.Security.Tokens.Add(signatureToken);
MessageSignature signature = new
 MessageSignature(signatureToken); //This line throws the exception

requestContext.Security.Elements.Add(signature);

推荐答案

证书似乎有问题。
It seems there is a problem with the certificate.


这篇关于使用X.509证书签署Soap信封:ArgumentException(WSE528)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆