zhaohongw2015 / kaixin001-helper

Automatically exported from code.google.com/p/kaixin001-helper
0 stars 0 forks source link

不支持代理服务器 #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
我这边是公司内网,给你我的代码:
//SNSHelper.Common.HttpHelp
//GetHtml加上
string address =
System.Configuration.ConfigurationManager.AppSettings["ProxyAddress"];
string account =
System.Configuration.ConfigurationManager.AppSettings["ProxyAccount"];
string password =
System.Configuration.ConfigurationManager.AppSettings["ProxyPassword"];
string domain =
System.Configuration.ConfigurationManager.AppSettings["ProxyDomain"];
if (address.Length > 0)
{
    IWebProxy proxy = new WebProxy(address);
    if (account.Length > 0)
    {
        proxy.Credentials = new NetworkCredential(account, password, domain);
    }
    httpWebRequest.Proxy = proxy;
}

Original issue reported on code.google.com by HamburgerWang on 20 Mar 2009 at 4:27

GoogleCodeExporter commented 8 years ago
425版本socket代理不能用

2011-04-27 16:59:00: 未处理的线程异常
基础连接已经关闭: 接收时发生错误。
   在 System.Net.HttpWebRequest.GetResponse()
   在 Jailu.Net.HttpHelper.GetHtml(String url, String postData, Boolean isPost, CookieContainer cookieContainer)
   在 Jailu.Net.RequestHelper.DoRequest(String key, String[] values)
   在 Jailu.Kaixin001.AccountHelper.GetLogin(String html)
   在 Jailu.Kaixin001.AccountHelper.Login(Action`1 display)
   在 Jailu.Kaixin001.City.Player.1ZZBdt5MR(String )
   在 Jailu.Kaixin001.City.Player.GotoIndex()
   在 Jailu.Kaixin001.City.Player.GotoIndexAndGetMyCityDetails()
   在 Jailu.Kaixin001.City.Win.frmAccountSetting.2EJYI4C5c(Object , LinkLabelLinkClickedEventArgs )
   在 System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
   在 System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
   在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.Label.WndProc(Message& m)
   在 System.Windows.Forms.LinkLabel.WndProc(Message& msg)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Original comment by blake...@gmail.com on 27 Apr 2011 at 9:05