get验证码后获取数据错误 求解 内服代码
用控制台写的
HttpWebRequest http = (HttpWebRequest)WebRequest.Create(url);
http.Method = "GET";
http.Accept = "image/webp,image/apng,image/*,*/*;q=0.8";
http.Host = host;
http.Referer = "http://www.606yl.com/reg.html";
http.CookieContainer = mycookie;
HttpWebResponse re = (HttpWebResponse)http.GetResponse();
foreach (Cookie cookie in re.Cookies)
mycookie.SetCookies(new Uri(url), ("" + cookie.Name + "=" + cookie.Value));
StreamReader item = new StreamReader(re.GetResponseStream(), Encoding.Default);
string username = "****";
string pwd = "*****";
string softKey = "*****";
//获取用户信息
string userInfo = VerCode.GetUserInfo(username, pwd);
byte[] bytes = Encoding.Default.GetBytes(item.ReadToEnd()); //一致感觉是这里的问题 但是又不知道怎么处理 求大神赐教
//上传字节集验证码
string returnMess = VerCode.RecByte_A(bytes, bytes.Length, username, pwd, softKey);
//上传本地验证码
System.Diagnostics.Debug.WriteLine(returnMess);
return returnMess;
bytes保存本地jpg 无法预览 png也不行