posts - 16,  comments - 83,  views - 18641
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

文章分类 -  C#基础

一个人能力的好坏
使用HttpWebRequest访问多个页面实现用同一Session
摘要:代码是很久很久以前写的了....现在把它放出来..string url = "http://localhost:2677/WebSite3/Default2.aspx"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.CookieContainer = new CookieContainer(); string s = "loginuser=1&password=1&logintype=%C1%AC%CF%DF%B9%FA%BC%CA&domainid=1& 阅读全文
posted @ 2011-03-04 17:30 [RJ] 阅读(3427) 评论(0) 推荐(0) 编辑
SSL/TLS 安全通道建立
摘要:在很多的业务需求中都可能会用到其他网站的数据..当遇到SSL(https)加密的页面时将会报错...我们可以用个小方法解决:先加入下面的方法 private bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; } 然后只需在访问SSL(https)加密的页面时在其方法前加上如下 ServicePointManager.ServerCertificateValidatio 阅读全文
posted @ 2011-03-04 17:20 [RJ] 阅读(984) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示