看了很多回答,还是不行!!!!!!这是我的代码:
List<KeyValuePair<string, string>> lstItemsIndexC = new List<KeyValuePair<string, string>>();
XmlDocument xmlDoc = new XmlDocument();
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications);
xmlDoc.Load("https://apps.myexponet.com/apps/aspnet/budget/js/indices_heb.xml");
我得到以下异常:
请求被中止:无法创建 SSL/TLS 安全通道。
说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息:System.Net.WebException:请求已中止:无法创建 SSL/TLS 安全通道。
源错误:
第 31 行:
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications); 第32行:第33行:
xmlDoc.Load(" https://apps.myexponet.com/apps/aspnet/budget/js/indices_heb.xml "); 第 34 行: 第 35 行: XmlNodeList MList = xmlDoc.SelectNodes("/indices/date");
有人可以帮帮我吗?我看了很多答案,但它并没有真正起作用!谢谢!