WebClient 403 Forbidden

Just add a simple line before you make your download:

string url = ... 
string fileName = ...

WebClient wb = new WebClient();
wb.Headers.Add("User-Agent: Other");   //that is the simple line!
wb.DownloadFile(url, fileName);

That’s it.

Leave a Comment