"DTD denied" error when accessing the sharepoint 2013 / office365 list (but not openly aware of XML usage)

I get a list of folders and files from Sharepoint (in Office 365) using the following code ...

...
   var folders = ListFolders(libraryName, clientContext, web);
...

public List<Folder> ListFolders(string libraryName, ClientContext clientContext, Web web)
    {
        var list = GetDocumentLibrary(libraryName, clientContext, web);
        var folders = list.RootFolder.Folders;
        clientContext.Load(folders);
        clientContext.ExecuteQuery();
        return folders.ToList();
    }

public List GetDocumentLibrary(string libraryName, ClientContext clientContext, Web web)     
        {
            var query = clientContext.LoadQuery(web.Lists.Where(p => p.Title == libraryName));
            clientContext.ExecuteQuery();
            return query.FirstOrDefault();
        }

It worked fine until I rebooted my computer (he installed Windows Update), I strongly suspect, based on some kind of testing that I did, it looks like it was called http://support.microsoft.com/kb / 2964358 .

When the clientContext.ExecuteQuery () statement is reached in GetDocumentLibrary (), the following exception.

"System.Xml.XmlException" System.Xml.dll : DTD XML. DTD, DtdProcessing XmlReaderSettings XmlReader.Create.

, , System.XML, , ExecuteQuery.

XMLReader clientContext ( , ), , , DTD. -, ... ( - Microsoft MSDN)

List list = clientContext.Web.Lists.GetByTitle(libraryName);
        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml = "<View/>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(list); clientContext.Load(listItems);
        clientContext.ExecuteQuery();

KB , ( , ), , KB , . . , . , Microsoft "" , , , .

+4
3

WiFi, , , , sharepoint, /wifi, .

+1

- Virgin Media (). , Virgin Media - " ". , . , .

, Virgin Media : http://pryankrohilla.blogspot.co.uk/2014/05/error-resolved-connect-sposervice-for.html

+1

I am not happy with this, I left setting up my program with the goal of making more diagnostic data this morning, but now the problem seems to have mysteriously stopped, regardless of whether it was changed at the end of the MS or not, or possibly a failure in SharePoint. I have no idea, I don’t think it was my laptop ever since it was since I had a problem.

0
source

Source: https://habr.com/ru/post/1539101/


All Articles