WebClient.UseDefaultCredentials Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets a Boolean value that controls whether default credentials are sent with requests.

Namespace: System.Net
Assembly: System.Net (in System.Net.dll)


Public Property UseDefaultCredentials As Boolean
public bool UseDefaultCredentials { get; set; }

Property Value

Type: System..::.Boolean
true if the default credentials are used; otherwise false. The default value is true.


Set this property to true when requests made by this WebClient object should, if requested by the server, be authenticated using the credentials of the currently logged on user. For client applications, this is the desired behavior in most scenarios. For applications that wish to control the authentication user experience, instead of using this property you would typically set the Credentials property to the credentials of the client on whose behalf the request is made.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


WebClient Class

System.Net Namespace