Credentials Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets authentication information for the request.

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

public NetworkCredential Credentials { get; set; }

Property Value

Type: System.Net..::..NetworkCredential
An ICredentials that contains the authentication credentials associated with the request. The default is nullNothingnullptrunita null reference (Nothing in Visual Basic).

The Credentials property contains authentication information to identify the maker of the request. The Credentials property can be either a NetworkCredential, in which case the user, password, and domain information contained in the NetworkCredential object is used to authenticate the request, or it can be a CredentialCache, in which case the Uniform Resource Identifier (URI) of the request is used to determine the user, password, and domain information to use to authenticate the request.

Show: