Я пишу программу, в которой я использую веб-сервис списка sharepoint и метод webclient.DownloadFile в C # для загрузки всех файлов в списке.Список содержит 1800 файлов, которые отображаются на 18 страницах, в результате по 100 файлов на каждой странице.Однако мой код загружает файлы только на первых 10 страницах (1000 файлов из 1800 файлов).Кто-нибудь есть идеи, в чем проблема?Вот мой код
XmlNode ndListItems = null;
XmlDocument xdoc = new XmlDocument();
XmlNode ndQuery = xdoc.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode ndViewFields = xdoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
XmlNode ndQueryOptions = xdoc.CreateNode (XmlNodeType.Element, "QueryOptions", "");
ndQuery.InnerXml = "";
ndViewFields.InnerXml = "";
ndQueryOptions.InnerXml = "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>";
ndListItems = list.GetListItems(ListName, "", ndQuery, ndViewFields, "1000", ndQueryOptions, null);
if (ndListItems!=null)
{ foreach (XmlNode node in ndListItems.ChildNodes) { if ( node.Name=="rs:data")
{ string[] foldernames = new string[node.ChildNodes.Count];
for (int i = 0; i < node.ChildNodes.Count; i++) { if (node.ChildNodes[i].Name == "z:row" && node.ChildNodes[i].Attributes != null)
{ string fileurl= node.ChildNodes[i].Attributes["ows_ServerUrl"].Value;
string filename = node.ChildNodes[i].Attributes["ows_LinkFilename"].Value;
string contenttype = node.ChildNodes[i].Attributes["ows_ContentType"].Value;
string copysource = serverAddress + fileurl;
Uri copyUrl = new Uri(copysource);
if (contenttype=="Folder")
{ foldernames[i] = filename;
Directory.CreateDirectory(copyDestination+ filename); continue; } try {
int index = FolderNamseContain(filename, copysource, foldernames);
if (index != -1) { wc.DownloadFile(copysource, copyDestination + foldernames[index] + "\\" + filename);
report.Write(fileurl);
report.WriteLine();
report.Flush(); }