I have a WebClient that works fine without the proxy, however I need to utilize the proxy (requirement - so please understand it is required). The problem is when I use the proxy I am getting a 400 Bad Request Response.
Basic Code is as follows, any idea as to what could be wrong? Everything seems like I did things proper..
WebClient webClient = new WebClient();
webClient.UseDefaultCredentials = true;
webClient.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.57");
WebProxy wp = new WebProxy("http://mypacfile.mycompany.com/proxy.pac");
webClient.Proxy = wp;
webClient.ReadXml("https://www.InfoService.Info.xml");
... do stuff with response ...