System.Security.Cryptography.CryptographicException 出现了内部错误

调试微信支付退款时,需要使用pfx证书,在本地调试时没有问题,但在服务器部署时报异常:
System.Security.Cryptography.CryptographicException 出现了内部错误

解决办法:

IIS 应用程序池--》选择应用程序池-->高级配置 -->“加载用户配置文件” 设置为True 。

原文地址:https://www.cnblogs.com/crazy29/p/4538092.html