程序请求网站时?报“基础连接已经关闭: 发送时发生异常。 -> System.IO.IOException: 由于远程方已关闭传输流,身份验证失败。”

程序请求网站时?报“基础连接已经关闭: 发送时发生错误。 ---> System.IO.IOException: 由于远程方已关闭传输流,身份验证失败。”

string url = "https://data.cathaylife.cn/servlet/HttpDispatcher/KAA0_0100/prompt?

newTxRequest=true&syscode=DA&subcode=KAA0";

  HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(login_url);

  myRequest.Method = "GET";

  HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();


最后一句执行过了报:“基础连接已经关闭: 发送时发生错误。 ---> System.IO.IOException: 由于远程方已关闭传输流,身份验证失败。

”,浏

览器是可以访问并能看到源码的。但是程序就不行。求解。各位大虾,帮忙一下。

------解决方案--------------------
国泰人寿。。。。。。

lz,原因是你没处理ssl请求处理办法。
我在2楼给你写
------解决方案--------------------
加上这句看看
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;