C# (429) Too Many Requests

17,261

It is not a C# problem. It is response from the web server. Probably some kind of anti-DOS filter. Try to make a pause between requests i.e. System.Threading.Thread.Sleep(5000); before each requests.

Share:
17,261
Mohanad
Author by

Mohanad

Updated on June 16, 2022

Comments

  • Mohanad
    Mohanad almost 2 years

    I've been using the WebClient in C# to get specific data from a webpage. That works well until I do it more than 2 times. If I do it more than more than 2 times it gives me the "(429) Too Many Requests." error. I have looked at other questions regarding this issue, by the way.

  • Mohanad
    Mohanad almost 10 years
    Thank you this worked! Now I just need to find the minimum pause time between requests so I can make it request as fast as possible.
  • Marc
    Marc over 2 years
    To adapt, for my application in NET FRAMEWORK 4.5.1, I used: request. UserAgent = ".NET Framework Test Client";