S71500 OPC UA 访问问题

已锁定

SmileyMZ

  • 帖子

    1
  • 精华

    0
  • 被关注

    0

论坛等级:新手

注册时间:2016-05-27

普通 普通 如何晋级?

S71500 OPC UA 访问问题

3267

2

2018-05-31 21:51:12

OPC UA 运行时抛出异常!!!

certificate = m_certificate = CertificateFactory.Load(certificate, true);

“certificate.PrivateKey”引发了类型“System.Security.Cryptography.CryptographicException”的异常


名称    值    类型

◢    certificate    {[Subject]  CN=UA Client 1500, DC=169.254.145.212 [Issuer]  CN=UA Client 1500, DC=169.254.145.212 [Serial Number]  498838C860CF17B54AAD18191EF71908 [Not Before]  2017-8-1 15:05:25 [Not After]  2019-8-1 15:05:25 [Thumbprint]  F22ECD54CF6FAF55173DE6CD11AAFEB8BABE3ACC }    System.Security.Cryptography.X509Certificates.X509Certificate2    

最终异常位置:

 System.Security.Cryptography.RSACryptoServiceProvider key = certificate.PrivateKey as System.Security.Cryptography.RSACryptoServiceProvider;

错误提示:

System.Security.Cryptography.CryptographicException:“该项不适于在指定状态下使用。

详细信息:

System.Security.Cryptography.CryptographicException

  HResult=0x8009000B

  Message=该项不适于在指定状态下使用。


  Source=mscorlib

  StackTrace:

   在 System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)

   在 System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)

   在 System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()

   在 System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)

   在 System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()

   在 Opc.Ua.CertificateFactory.Load(X509Certificate2 certificate, Boolean ensurePrivateKeyAccessible) 在 D:\OPC UA开发\109737901_OPC_UA_Client_S7-1500_CODE_V12\OPC_UA_Client_1500\UA_Client_1500\Stack\Core\Security\Certificates\CertificateFactory.cs 中: 第 84 行

   在 Opc.Ua.CertificateIdentifier.Find(Boolean needPrivateKey) 在 D:\OPC UA开发\109737901_OPC_UA_Client_S7-1500_CODE_V12\OPC_UA_Client_1500\UA_Client_1500\Stack\Core\Security\Certificates\CertificateIdentifier.cs 中: 第 233 行

   在 Siemens.UAClientHelper.UAClientHelperAPI.CreateClientConfiguration() 在 D:\OPC UA开发\OPC_UA_Client_1500_DEMO_V1\OPC_UA_Client_1500\OPC_UA_Client_1500\UAClientHelperAPI.cs 中: 第 1194 行

   在 Siemens.UAClientHelper.UAClientHelperAPI..ctor() 在 D:\OPC UA开发\OPC_UA_Client_1500_DEMO_V1\OPC_UA_Client_1500\OPC_UA_Client_1500\UAClientHelperAPI.cs 中: 第 40 行

   在 OPC_UA_Client_1500.UAClientForm..ctor() 在 D:\OPC UA开发\OPC_UA_Client_1500_DEMO_V1\OPC_UA_Client_1500\OPC_UA_Client_1500\UAClientForm.cs 中: 第 58 行

   在 OPC_UA_Client_1500.Program.Main() 在 D:\OPC UA开发\OPC_UA_Client_1500_DEMO_V1\OPC_UA_Client_1500\OPC_UA_Client_1500\Program.cs 中: 第 19 行

西门子热线说解决不了,他那没这问题......求高手解答!!!非常感谢。

S71500 OPC UA 访问问题 已锁定
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-1500系列

共有10665条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
X 图片
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。