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)
ParameterType描述
host字符串与凭据关联的主机名。
portint32_t端口号。
authenticationType字符串身份验证方案。
凭据System::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)
ParameterType描述
uriPrefixSystem::SharedPtr<Uri>与凭据关联的资源的 URI 前缀。
authenticationType字符串身份验证方案。
凭据System::SharedPtr<NetworkCredential>要添加的凭据。

另见