Monday, March 12, 2012

The remote server returned an error: (500) Internal Server Error (Webclient)

The solution is to set the user agent and add it as header to the webclient object.
Code:
newWebClient.Headers.Add("user-agent",   
"Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0");

0 comments:

Post a Comment