我正在从具有凭证的服务引用中调用Web服务,但是最近他们(基础架构团队)在服务器内添加了代理,因此现在我无法连接到服务器以使用Web服务。
到目前为止,我的代码是:
using (AttachmentServicesClient client = new AttachmentServicesClient())
{
client.ClientCredentials.UserName.UserName = userName;
client.ClientCredentials.UserName.Password = password;
#region i tried this but didn't work
client.ClientCredentials.Windows.ClientCredential.Domain = proxyaddress;
client.ClientCredentials.Windows.ClientCredential.UserName =
usernameProxy;
client.ClientCredentials.Windows.ClientCredential.Password =
passwordProxy;
#endregion
response = client.CreateDocument(doc);
}
我想念什么?