none
CSOM DTD is prohibited RRS feed

  • Question

  • Hi,

    I am trying to connect to a newly created Office365 SharePoint website using CSOM, but I am getting the following exception on calling ExecuteQuery method: 

    "For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method."

    using (var clientContext = new ClientContext(url))
    {
        clientContext.Credentials = new SharePointOnlineCredentials(userName, secureStringPassword); ;
        var web = clientContext.Web;
        clientContext.ExecuteQuery();
    }

    The code works fine for all except one newly created SharePoint site. The nuget package used is Microsoft.SharePointOnline.CSOM.

    Thanks,

    Mujtaba

    Friday, January 20, 2017 10:09 AM

Answers

All replies