Skip to content

Http proxy not working with authentication #64459

@jkvargas

Description

@jkvargas

Description

I am not able to authenticate to a proxy using given credentials.
What am I missing?
Thanks.

Reproduction Steps

using var httpClientHandler = new HttpClientHandler
{
    Proxy = new WebProxy(address, true, new string[] {}, new NetworkCredential(someuser, somepass)),
    UseProxy = true,
    ServerCertificateCustomValidationCallback = (_, _, _, _) => true,
};

using var client = new HttpClient(httpClientHandler);

Expected behavior

I would like to perform gets/posts through the given proxy.

Actual behavior

authentication fails

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.HttpquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions