我正在尝试使用第 3 方 WSDL。我已将其添加为服务参考。我像这样初始化客户端和查询参数:
var ltRequest = new SearchEmailAddressStatus
{
EmailAddress = emailAddressList.ToArray()
};
var ltClient = new CommunicationPreferenceServiceClient
{
ClientCredentials =
{
UserName =
{
UserName = ltProperties.CompanyCredential.UserName,
Password = ltProperties.CompanyCredential.Password
}
}
};
var ltResponse = ltClient.searchEmailAddressStatusWS(ltRequest);
在 Fiddler 中查看数据包后,我注意到 Auth 标头从未发送到服务器。有没有办法在我的请求中手动插入授权标头?