一般安全错误(没有找到解密用的证书(KeyId))。

问题描述 投票:0回答:1

我试图使用WCF-Customs适配器和自定义绑定从BizTalk调用Web服务。我被提供了一个私钥和一个公钥证书。

我用下面的绑定配置配置了绑定。

enter image description here

enter image description here

enter image description here

我的行为配置如下

我指定了客户端证书的私钥。

enter image description here

而对于服务,我指定了公钥

enter image description here

但我得到了下面的错误。任何帮助将非常感谢

System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: General security error (No certificates were found for decryption (KeyId))
   --- End of inner exception stack trace ---

Server stack trace: 
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels.IRequestChannel.E
c# biztalk wcf-binding
1个回答
0
投票

请确保证书的私钥可以被运行客户端应用的账户访问,这通常需要我们将当前用户添加到证书的私钥管理组中。此外,https安全通信需要在SOAP包络中加入时间戳。因此,服务器端和客户端之间的系统时间应该是一致的。下面是一些相关的讨论。"没有找到用于解密的证书"(Apache CXF,WS-Security)。

http:/cxf.547215.n5.nabble.comGeneral-security-error-No-certificates-werfound-for-decryption-KeyId-td4367559.html。 如果有什么需要我帮忙的,请随时告诉我。

© www.soinside.com 2019 - 2024. All rights reserved.