天上人间的BLOG

天上人间.net

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

httpreqeust无法模拟keeplive=true的解决方案:

增加下面这一句就可以了:

httpWebRequest.ServicePoint.GetType().GetProperty("HttpBehaviour", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(httpWebRequest.ServicePoint, (byte)0, null)

posted on 2014-12-01 22:44  I'mQQ  阅读(444)  评论(0)    收藏  举报