CredentialCache

CredentialCache ECMA 1.0

System.Net (system.dll) class

This class maintains credentials for multiple network resources. If you are developing a client application that needs to authenticate itself to more than one server, you can store an instance of this class in the WebRequest.Credentials property.

After you create an instance of this class, use the Add( ) method to associate NetworkCredential objects with a URI and authentication type (using a string such as " Basic " or " Digest "). Then you can assign the CredentialCache instance to the WebRequest.Credentials property to use the credentials for future web requests .

 public class  CredentialCache  : ICredentials, IEnumerable {  // Public Constructors  public  CredentialCache  ( );  // Public Static Properties  public static ICredentials  DefaultCredentials  {get; }  // Public Instance Methods  public void  Add  (Uri   uriPrefix   , string   authType   , NetworkCredential   cred   );    public NetworkCredential  GetCredential  (Uri   uriPrefix   , string   authType   )  // implements ICredentials  public IEnumerator  GetEnumerator  ( );  // implements IEnumerable  public void  Remove  (Uri   uriPrefix   , string   authType   ); } 


C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net