当前位置: 代码迷 >> 综合 >> 解决错误at System.Net.HttpWebRequest.GetResponse()
  详细解决方案

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

热度:35   发布时间:2023-12-21 08:19:33.0
在下面加上红色这句:


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();
  相关解决方案