C# SharePoint身份验证失败
我正在尝试访问我的SharePoint(例如:https://exampleSharpoint.com)web服务以获取一些信息,但它会在代码中提供这些信息 我的web配置:C# SharePoint身份验证失败,c#,sharepoint,C#,Sharepoint,我正在尝试访问我的SharePoint(例如:https://exampleSharpoint.com)web服务以获取一些信息,但它会在代码中提供这些信息 我的web配置: <security mode="Transport"> <transport clientCredentialType="Ntlm"/> </security> 它将在最后一行“客户端身份验证方案'Ntlm'禁止HTTP请求”抛出异常。请提供任何建议 注意:我使用的是Share
<security mode="Transport">
<transport clientCredentialType="Ntlm"/>
</security>
它将在最后一行“客户端身份验证方案'Ntlm'禁止HTTP请求”抛出异常。请提供任何建议
注意:我使用的是SharePoint的最新版本,它与SharePoint的早期版本配合得很好您应该通过寻找更好的日志来深入研究这个问题。以下文档可能会对此有所帮助:请提供任何解决方案:(
listService.Endpoint.Address =
new System.ServiceModel.EndpointAddress(scolurl + "/_vti_bin/Lists.asmx");
if (_userName != null)
{
listService.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential(_userName, _passWord, _domain);
//listService.ClientCredentials.UserName.UserName = _userName;
//listService.ClientCredentials.UserName.Password = _userName;
}
else
{
listService.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
}
XmlDocument doc = new XmlDocument();
doc.LoadXml(query);
XmlNode queryNode = doc.SelectSingleNode("//Query");
XmlNode viewNode = doc.SelectSingleNode("//ViewFields");
XmlNode optionNode = doc.SelectSingleNode("//QueryOptions");
try
{
XmlNode retNode = listService.GetListItems("My Project", null, queryNode, viewNode, null, optionNode, null);