WebRequest.UseDefaultCredentials Property

July 28, 2014

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.

ExceptionCondition
NotImplementedException

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

Show:
© 2014 Microsoft