0

I'm trying to download a webpage. It was working previously but now I'm getting 413's specifically mentioning 'Payload too large' (unlike what seems to be the normal error message 'Request Entity Too Large')

Here's the code; I've tried all sorts of web config changes suggested in related questions but no luck.

WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)");
var page = client.DownloadString(websiteUrl);
Jimmy
  • 2,191
  • 6
  • 25
  • 45
  • 1
    add accept encoding with gzip and decompres – Selvin Nov 24 '20 at 17:00
  • @Selvin Perfect! Your suggestion led me to this answer which worked, tyvm- https://stackoverflow.com/questions/2973208/automatically-decompress-gzip-response-via-webclient-downloaddata – Jimmy Nov 25 '20 at 06:07

0 Answers0