微信支付Cryptography.CryptographicException: 系统找不到指定的文件
广告:
WxPayAPI.WxPayException: System.Security.Cryptography.CryptographicException: 系统找不到指定的文件。 在 System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) 在 System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) 在 System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) 在 System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) 在 WxPayAPI.HttpService.Post(String xml, String url, Boolean isUseCert, Int32 timeout) 位置 E:\aspnet2.0\nyweb_jia\微信支付\WxPayAPI_xiyaohe2017\WxPayAPI\lib\HttpService.cs:行号 68 在 WxPayAPI.HttpService.Post(String xml, String url, Boolean isUseCert, Int32 timeout) 位置 E:\aspnet2.0\nyweb_jia\微信支付\WxPayAPI_xiyaohe2017\WxPayAPI\lib\HttpService.cs:行号 124 在 WxPayAPI.WxPayApi.Refund(WxPayData inputObj, Int32 timeOut) 位置 E:\aspnet2.0\nyweb_jia\微信支付\WxPayAPI_xiyaohe2017\WxPayAPI\lib\WxPayApi.cs:行号 196 在 WxPayAPI.Refund.Run(String transaction_id, String out_trade_no, String total_fee, String refund_fee)
System.Security.Cryptography.CryptographicException: 指定的网络密码不正确。
1 操作证书要安装在电脑上
2 下载的时候需要手机验证及登录密码。下载后找到apiclient_cert.p12这个证书,双击导入,导入的时候提示输入密码,这个密码就是商户ID,且必须是在自己的商户平台下载的证书3 上面的SSLCERT_PASSWORD就是MCHID,也就是商户ID,SSLCERT_PASSWORD错误会出现指定的网络密码不正确的提示
4 iis设置加载用户配置文件为 true
广告: