有人可以向我解释如何为Dynamics CRM网络服务指定身份验证吗?我目前的尝试没有产生任何结果:
var svc = new CrmServiceSoapClient("CrmServiceSoap");
svc.ClientCredentials.UserName.UserName = Resources.UserName;
svc.ClientCredentials.UserName.Password = Resources.Password;
svc.ClientCredentials.Windows.ClientCredential.UserName = Resources.UserName;
svc.ClientCredentials.Windows.ClientCredential.UserName = Resources.Password;
return svc;
谢谢!
答案 0 :(得分:1)
我做其中一个(可能不是确切的代码,但你明白了):
svc.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
svc.ClientCredentials.Windows.ClientCredential = new ClientCredential("", "", "");