0

I try upload some array data via WebClient, so i have something like this:

using (WebClient cl = new WebClient())
{
    cl.UploadValues("some url", "POST", GetUploadCollection(proxies));
}

private static NameValueCollection GetProxyUploadCollection(List<string> proxies)
{
    NameValueCollection result = new NameValueCollection();

    for (int i = 0; i < proxies.Count; i++)
    {
        result[String.Format("proxies[{0}]", i)] = proxies[i];
    }

    return result;
}

and script on other side gets only first 1000 records. Why? (I'v checked result variable in GetProxyUploadCollection method, it contains more than 1k elements) upd: maxRequestLength - is not the solution. I made my data values even more large (just for test result[String.Format("proxies[{0}]", i)] = String.Concat(proxies[i], proxies[i], proxies[i], proxies[i], proxies[i], proxies[i]);) and i get the same 1k elements array on the server side

l1ar
  • 1
  • 1
  • Maybe helpful:[What is the size limit of a post request](http://stackoverflow.com/questions/2364840/what-is-the-size-limit-of-a-post-request) [Maximum request length exceeded](http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded) – Lei Yang Nov 25 '16 at 02:30
  • Thanx for reply! But no, I had tried to increase maxRequestLength, same result – l1ar Nov 25 '16 at 05:22

1 Answers1

0

My bad - C# code is ok problem was on server php script side - max_input_vars settig limits post query

l1ar
  • 1
  • 1