add user agent for http client c# code example Example: WebClient c# with custom user agent client.Headers["User-Agent"] = "myUserAgentString";