I am using the WebClient class with cookies as mentioned here: http://stackoverflow.com/questions/1777221/c-using-cookiecontainer-with-webclient-class
What steps are required to add a custom user agent to every request made by this WebClient?
I tried to put the
Headers.Add(HttpRequestHeader.UserAgent, "...")
line into
protected override WebRequest GetWebRequest
but that did not work: "This header must be modified using the appropriate property".