Questions tagged «cryptographicexception»

5
未处理CryptographicException:系统找不到指定的文件
我试图掩盖SSL通信的奥秘,并在此站点上找到了不错的教程。我正在尝试测试自己的证书。使用Visual Studio 2012,我只是添加了一个现有文件(我的证书为.pfx格式),然后在app.config中更改了“证书”和“密码”设置。但是,当尝试运行它时,出现错误: 未处理CryptographicException:系统找不到指定的文件 然后,我在Web服务中尝试了同样的方法。在那里,我得到了有关该错误的更多详细信息: System.Security.Cryptography.CryptographicException: System cannot find specified file. at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) at System.Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName) at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) v System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password) v TestServer.DataService.LoadSoap() v c:\Users\Administrator\Documents\Visual Studio 2012\Projects\TestServer\TestServer\DataService.asmx.cs:line 48 我已经将这个问题写给文章的作者,但是由于他的上次答复是在2012年3月,所以我不确定他是否会答复。如果有人可以帮助我解决这个问题,我将不胜感激。 PS:将证书从.cer导出到.pfx时,我已更改了导出文件的标题。尽管我怀疑它对问题的影响,但我还是想提一下。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.