Using X509Certificate2 to get PrivateKey causes CryptographicException “Invalid provider type specified”

前端 未结 2 1243
感动是毒
感动是毒 2021-01-18 12:23

everyone,

I am developing a web application that uses X509Certificate2 to get a private key from a certification file. Code snippet looks like following:

<         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-18 13:08

    may be it useful to you; On local try:

    X509Certificate2 pc = new X509Certificate2(strFileName, strPassword);
    

提交回复
热议问题