How can constructing an X509Certificate2 from a PKCS#12 byte array throw CryptographicException(“The system cannot find the file specified.”)?

前端 未结 5 1027
有刺的猬
有刺的猬 2020-12-04 19:23

I\'m trying to construct an X509Certificate2 from a PKCS#12 blob in a byte array and getting a rather puzzling error. This code is running in a desktop applica

5条回答
  •  庸人自扰
    2020-12-04 19:53

    I had this same problem.

    1. Open IIS on the server hosting the site.
    2. Find the application pool for the site.
    3. Click Advanced Settings.
    4. Change "Load User Profile" to true. (may require restart or reboot)

    This allows the crypto subsystem to work.

提交回复
热议问题