导入 System.Security
代码:
[code]
using System.Security.Cryptography.X509Certificates;
using System.Net;
using System.Security.Authentication;
using System.Net.Security;
using WebServiceWithSSL.localhost;
X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
X509Certificate2Collection certs = X509Certificate2UI.SelectFromCollection(store.Certificates, "Certificates", "Please select certificate to use", X509SelectionFlag.SingleSelection);
localhost.Version vs = new localhost.Version();
vs.ClientCertificates.Add(certs[0]);
string wsRet = vs.getVersion().@return;[/code]
1737


&spm=1001.2101.3001.11974&articleId=83164089&d=1&t=3&u=9f6b70ee5bd54b9898966e497410553c)

被折叠的 条评论
为什么被折叠?



