Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Proxy authentication required(407) is returned only for https connection on VS for Mac 7.6.11


I have an question about accessing URLs starting with https via proxy with authentication on Mac.

When I use Visual Studio for Mac 7.4.1, my app (like following code) can access URLs starts with both http and https via proxy properly.
But when I use Visual Studio for Mac 7.6.11, it (same code) can access only URLs starts with http via proxy.
For https, "Proxy authentication required(407)" exception always occurs.

WebProxy webProxy = new WebProxy(proxyAddress, proxyPort);
webProxy.Credentials = new NetworkCredential(proxyUser, proxyPassword);
HttpClientHandler handler = new HttpClientHandler();
handler.Proxy = webProxy;
HttpClient client = new HttpClient(handler);
HttpResponseMessage res = await client.GetAsync(url);

If I use proxy which does not request an authentication, the app can access URLs starts with https via proxy properly.

Should I change the way to pass credential information on new Visual Studio for Mac?



Sign In or Register to comment.