See Also: CredentialCache Members
The System.Net.CredentialCache class stores credentials for multiple Internet resources. Applications that need to access multiple resources can store the credentials for those resources in a System.Net.CredentialCache instance that then provides the proper set of credentials to the Internet resource when required. When the CredentialCache.GetCredential(Uri, string) method is called, it compares the Uniform Resource Identifier (URI) and authentication type provided with those stored in the cache and returns the first set of credentials that match.
The CredentialCache.DefaultCredentials property contains the system credentials of the current security context. For client applications, these represent the user name, password, and domain of the user who is currently logged in. For ASP.NET applications, the default credentials are the user credentials of the logged-in user or the user being impersonated.