Bad Request 400 - protocol error on a valid url - Webclient
问题 I am trying to parse this page (http://www.coleparmer.co.uk/Product/Turb_Std_Hach_2100q_Kit/WZ-99900-47) using webclient and am having no luck. var client = new WebClient(); var html = client.DownloadString("http://www.coleparmer.co.uk/Product/Turb_Std_Hach_2100q_Kit/WZ-99900-47"); 回答1: The appropriate headers needs to be set. try { string html; using (WebClient client = new WebClient()) { client.Headers.Add("Accept-Language", " en-US"); client.Headers.Add("Accept", " text/html, application