日期:2014-05-20 浏览次数:21144 次
private void GetHttps() { ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult); HttpWebRequest req = (HttpWebRequest)WebRequest.CreateDefault(new Uri("https://****/Default.html")); req.Method = "GET"; HttpWebResponse res = (HttpWebResponse)req.GetResponse(); Stream test = res.GetResponseStream(); //在下面想做B端向A端回写数据的过程,这个过程怎么通过刚才的HTTPS访问加密呢? //第一次做HTTPS的理解的有点不太准确,请大家指导下 } public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; }