码迷,mamicode.com
首页 > Web开发 > 详细

HttpWebRequest使用证书请求

时间:2015-06-24 16:19:52      阅读:434      评论:0      收藏:0      [点我收藏+]

标签:

HttpWebRequest使用证书请求

 //是否使用证书
                if (isUseCert)
                {
                    string path = HttpContext.Current.Request.PhysicalApplicationPath;
                    X509Certificate2 cert = new X509Certificate2(path);
                    request.ClientCertificates.Add(cert);
                    Log.Debug("req", "PostXml used cert");
                }

HttpWebRequest使用证书请求

标签:

原文地址:http://www.cnblogs.com/DTWolf/p/4597799.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!