Export (0) Print
Expand All

WebClient.UseDefaultCredentials Property

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 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.

The property is applicable to client HTTP handling for ClientHttp and does only apply to browser HTTP handling for BrowserHttp.

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft