1、清理request的请求数据
PropertyInfo isreadonly =typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
// make collection editable
isreadonly.SetValue(HttpContext.Current.Request.QueryString, false, null);
foreach (var key in HttpContext.Current.Request.QueryString.AllKeys)
{
HttpContext.Current.Request.QueryString.Set(key, HttpContext.Current.Request.QueryString[key].Split(‘,‘).First());
//HttpContext.Current.Request.QueryString[key] = HttpContext.Current.Request.QueryString[key].Split(‘,‘).First();
}
isreadonly.SetValue(HttpContext.Current.Request.QueryString, true, null);