The request must use the HttpClient built with your proxy handler. Creating an unrelated WebProxy object does not affect another client's route.

using System;
using System.Net;
using System.Net.Http;

var proxy = new WebProxy("http://203.0.113.10:8080")
{
    BypassProxyOnLocal = false
};

using var handler = new HttpClientHandler
{
    Proxy = proxy,
    UseProxy = true
};

using var client = new HttpClient(handler)
{
    Timeout = TimeSpan.FromSeconds(15)
};

using var response = await client.GetAsync("https://example.com/");
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());

Use a real HTTP proxy from your service or the HTTP proxy list in place of the documentation address. This top-level syntax fits a modern C# console project; older projects can put the statements in an asynchronous Main.

Check both handler properties: Proxy selects the endpoint and UseProxy=true enables its use. If the endpoint works separately but not in your application, confirm that no code disables UseProxy and that the call uses this instance. The dedicated handler avoids relying on process or OS discovery.

When the proxy operator supplies an account, assign a NetworkCredential to the WebProxy.Credentials property. Website Authorization serves a different hop, and a public IP:port entry supplies no default login. An http:// listener can carry HTTPS through tunneling; retain normal destination verification.

This short program disposes objects at exit. For repeated service calls, follow .NET client-lifetime guidance and retain the client/handler for the workload instead of rebuilding its connection pools per request. Inspect the returned status: a functioning proxy path can still carry a website rejection.

Artihkkalat mat laktásit