J'ai une méthode get list simple pour sharepoint (SharePointList est un webrefrence à list.asmx).Le programme WCF se comporte étrangement sur un serveur - pourquoi?
/// <summary>
/// Returns a list of sharepoint lists
/// </summary>
/// <returns>A list of sharepoint lists</returns>
private string GetSharePointLists()
{
StringBuilder stringBuilder = new StringBuilder();
try
{
SharePointList.ListsSoapClient proxy = new SharePointList.ListsSoapClient();
proxy.ClientCredentials.Windows.ClientCredential = new NetworkCredential();
XmlElement lists = proxy.GetListCollection();
var q = from c in lists.ChildNodes.Cast<XmlNode>()
select new
{
DefaultViewUrl = c.Attributes["DefaultViewUrl"].Value,
Title = c.Attributes["Title"].Value
};
foreach (var x in q)
{
stringBuilder.AppendLine(string.Format("{0} http://REMOVED/{1}", x.Title, x.DefaultViewUrl.Replace(" ", "%20")));
}
}
catch (Exception ex)
{
throw new Exception(ex.ToString());
}
return stringBuilder.ToString();
}
Cela fonctionne très bien sur ma boîte de dev. Cela fonctionnait aussi bien sur ma machine de test. Une fois la machine de test reconstruite, j'obtiens toujours cette erreur sur proxy.GetListCollection() -
La requête HTTP n'est pas autorisée avec le schéma d'authentification client 'Ntlm'. L'en-tête d'authentification reçu du serveur était 'NTLM'.
Quelqu'un sait ce qui se passe ici et comment le réparer?
Contrôle de bouclage local? http://support.microsoft.com/kb/896861 – Ryan