解决错误at System.Net.HttpWebRequest.GetResponse()

来源:互联网 发布:斗鱼 鱼丸软件 编辑:程序博客网 时间:2024/05/19 00:42
在下面加上红色这句:


HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create(url);//?act=writePayInfo&payphone=" + num
        Request.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)";
        WebResponse Response = Request.GetResponse();
0 0