CredentialCache.DefaultNetworkCredentials Property
Assembly: System (in system.dll)
'Declaration Public Shared ReadOnly Property DefaultNetworkCredentials As NetworkCredential 'Usage Dim value As NetworkCredential value = CredentialCache.DefaultNetworkCredentials
/** @property */ public static NetworkCredential get_DefaultNetworkCredentials ()
public static function get DefaultNetworkCredentials () : NetworkCredential
Not applicable.
Property Value
An NetworkCredential that represents the network credentials of the current user or application.The credentials returned by the DefaultNetworkCredentials property is applicable only for NTLM, negotiate, and Kerberos-based authentication.
The credentials returned by DefaultNetworkCredentials represents the authentication credentials for the current security context in which the application is running. For a client-side application, these are usually the Windows credentials (user name, password, and domain) of the user running the application. For ASP.NET applications, the default network credentials are the user credentials of the logged-in user, or the user being impersonated.
- EnvironmentPermission for reading the USERNAME environment variable. Associated enumeration: Read
Windows 98, Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.