Assembly: System (in system.dll)
/** @property */ public ICredentials get_Credentials () /** @property */ public void set_Credentials (ICredentials value)
public function get Credentials () : ICredentials public function set Credentials (value : ICredentials)
Property ValueAn ICredentials containing the authentication credentials for the request. The default is a null reference (Nothing in Visual Basic).
The Credentials property contains the authentication credentials used to access a resource on a host. In most client-side scenarios, you should use the DefaultCredentials, which are the credentials of the currently logged on user. To do this, set the UseDefaultCredentials property to true instead of setting this property.
If the WebClient class is being used in a middle tier application, such as an ASP.NET application, the DefaultCredentials belong to the account running the ASP page (the server-side credentials). Typically, you would set this property to the credentials of the client on whose behalf the request is made.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.