CredentialCache Constructor ()
.NET Framework (current version)
Creates a new instance of the CredentialCache class.
Assembly: System (in System.dll)
The constructor creates a CredentialCache instance.
The following code example initializes a CredentialCache with multiple security credentials and uses those credentials with a WebRequest.
CredentialCache^ myCache = gcnew CredentialCache; myCache->Add( gcnew Uri( "http://www.contoso.com/" ), "Basic", gcnew NetworkCredential( UserName,SecurelyStoredPassword ) ); myCache->Add( gcnew Uri( "http://www.contoso.com/" ), "Digest", gcnew NetworkCredential( UserName,SecurelyStoredPassword,Domain ) ); wReq->Credentials = myCache;
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.1
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.1
Windows Phone
Available since 8.1
Show: