This sequence looks explicit, but in .NET 10 it ends with no proxy credential:

proxy.Credentials = new NetworkCredential(proxyUser, proxyPassword);
proxy.UseDefaultCredentials = false;

In the .NET 10 WebProxy implementation, setting UseDefaultCredentials to false assigns null to Credentials. Setting it to true selects CredentialCache.DefaultCredentials. The two properties control the same account choice.

For a service-specific account, assign the intended credential without a later reset:

var proxy = new WebProxy("http://proxy.example.net:8080")
{
    Credentials = new NetworkCredential(proxyUser, proxyPassword)
};

If existing setup code must turn default credentials off explicitly, do that before assigning the NetworkCredential. Its getter can be false while an explicit credential is correctly present; false does not necessarily mean that no account is configured.

Attach this object to the handler performing the request. For integrated Windows authentication, deliberately select default credentials instead, using the process's applicable identity.

Check object-initializer order and helper methods for later assignments that replace the intended account. Bind this diagnosis to the WebProxy implementation in use; a similarly named property on an HTTP handler can govern a different authentication scope.

Аффингæй хæстæг статьялтæ