UseDefaultCredentials Property
Collapse the table of content
Expand the table of content

WebRequest.UseDefaultCredentials Property

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

When overridden in a descendant class, 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 virtual bool UseDefaultCredentials { get; set; }

Property Value

Type: System.Boolean
true if the default credentials are used; otherwise false. For requests created using the ClientHttp stack, the default value is false.


This property is not implemented.

Set this property to true when requests made by this WebRequest 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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft