System::Net::CredentialCache::Add 方法

CredentialCache::Add(String, int32_t, String, System::SharedPtr<NetworkCredential>) method

将指定的网络凭据添加到缓存中。

void System::Net::CredentialCache::Add(String host, int32_t port, String authenticationType, System::SharedPtr<NetworkCredential> credential)
参数类型描述
hostString与凭据关联的主机名。
portint32_t端口号。
authenticationTypeString身份验证方案。
credentialSystem::SharedPtr<NetworkCredential>要添加的凭据。

另见

CredentialCache::Add(System::SharedPtr<Uri>, String, System::SharedPtr<NetworkCredential>) method

将指定的网络凭据添加到缓存中。

void System::Net::CredentialCache::Add(System::SharedPtr<Uri> uriPrefix, String authenticationType, System::SharedPtr<NetworkCredential> credential)
参数类型描述
uriPrefixSystem::SharedPtr<Uri>与凭据关联的资源 URI 前缀。
authenticationTypeString身份验证方案。
credentialSystem::SharedPtr<NetworkCredential>要添加的凭据。

另见