即时通讯通过我从Apple .p12文件制作的字节数组创建证书.
X509Certificate2 cert = new X509Certificate2(AppleCertBytes, ApplePassword);
仅当im在本地主机上时,此方法才能正常工作并创建cert,BUT.
当我构建WebService并将其发布到服务器时,它不起作用.
我将日志放置在任何可能的地方,并且我注意到运行此行时请求已消失.
服务器无响应,有时甚至无响应Err: connection_reset
.当我调试过程时,我没有看到任何错误,并且我认为.dll
文件可能是问题错误,我认为我用不同的日志对其进行了11次检查,而且似乎随时都在更新.
编辑 不会引发异常.
我在这里想念什么吗?可能是ApplicationPool,还是插件?
请注意.
我不要创建证书的任何插件,我想要可能的结果.谢谢.
im creating a certificate via a byte array I make from an Apple .p12 file.
X509Certificate2 cert = new X509Certificate2(AppleCertBytes, ApplePassword);
this works fine and creates the cert,BUT, only when im on localhost.
When i build and publish my WebService to the server it doesn't work.
I placed logs wherever I can, and i noticed that the request sort of gone when running this row.
I get no response for server and sometimes even get Err: connection_reset
.
When i debug the process i don't see any errors, and i thought maybe the .dll
file was the issue bug I think i checked it for like 11 times with different logs and it seems updated at anytime.
EDIT No exception is thrown.
Is there anything I'm missing here? ApplicationPool maybe, plugin or such?
PLEASE NOTICE.
I DON'T want any plugins that create the certificate, i want a possible results. Thanks.
You need to use another overload of the constructor to store the private keys in the local computer store.
Your constructor should read:
var cert = new X509Certificate2(
AppleCertBytes,
ApplePassword,
X509KeyStorageFlags.MachineKeySet);
本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文