您好我试图为HttpWebResponse构建普通的查询字符串参数。 我去了 www.ex.com?PageId=2&UserId=123 ,如果我通过我自己更改PageId或UserId,所有在网络上工作正常,但当我在我的HttpWebResponse中发送此请求时它不起作用。 我正在使用查询字符串参数很多次,这个看起来像所有其他没有什么特别的东西(填充查询字符串参数和发送),但它不起作用。
我做错了什么?
这是我的代码
HttpWebResponse Account =RedirectToUrl("https://www.ex.com/current.aspx?PageId=02.03.2014&UserId=13.04.2014<FilterSelected=none)
private HttpWebResponse RedirectToUrl(string RedirectUrl)
{
HttpWebRequest redirectRequest = (HttpWebRequest)WebRequest.Create(RedirectUrl);
redirectRequest.CookieContainer = new CookieContainer();
redirectRequest.CookieContainer = _cookies;
redirectRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"; redirectRequest.Method = "GET";
redirectRequest.AllowAutoRedirect = true;
redirectRequest.Timeout = 15000;
HttpWebResponse RedirectResponse = (HttpWebResponse)redirectRequest.GetResponse();
return RedirectResponse;
}