根据网上资料:
public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
//直接确认,否则打不开
return true;
}
private void button1_Click(object sender, EventArgs e)
{
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);
HttpWebRequest req = (HttpWebRequest)WebRequest.CreateDefault(new Uri("https://zu14.cn/"));
req.Method = "GET";
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
//...正常使用了,和访问普通的 http:// 地址一样了
这样就可以直接访问网站了,为什么我就是不行呢?
大家可否帮我看下,例如:https://login.5173.com/Login.aspx
用户名:testlogin密码:test11
public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
//直接确认,否则打不开
return true;
}
private void button1_Click(object sender, EventArgs e)
{
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);
HttpWebRequest req = (HttpWebRequest)WebRequest.CreateDefault(new Uri("https://zu14.cn/"));
req.Method = "GET";
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
//...正常使用了,和访问普通的 http:// 地址一样了
这样就可以直接访问网站了,为什么我就是不行呢?
大家可否帮我看下,例如:https://login.5173.com/Login.aspx
用户名:testlogin密码:test11
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货