HttpClientHandler.DefaultProxyCredentials 属性

定义

使用默认(系统)代理时,获取或设置要提交到默认代理服务器进行身份验证的凭据。 只有在 UseProxy 设置为 trueProxy 设置为 null 时才使用默认代理。

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public System.Net.ICredentials? DefaultProxyCredentials { get; set; }
C#
public System.Net.ICredentials DefaultProxyCredentials { get; set; }

属性值

对默认代理服务器的请求进行身份验证所需的凭据。

属性

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1