I created a project for ASP NET where I want to get the data of an address from the CEP by querying a call from the url in a webservice.
On my machine it works normally, however on the machine I work, there is a need for network authentication. When I submit the submit in form, the exception is thrown with the following message:
The remote server returned an error: (407) Mandatory Proxy Authentication.
Below is the code I tried to use to connect from other StackOverflow gringas, but to no avail:
WebClient webClient = new WebClient();
webClient.Proxy = new WebProxy("XX.XX.XX.XXX", 999);
webClient.Credentials = new NetworkCredential("XXXXX", "*********");
Thanks for the help!