DTD is prohibited in this XML document when using CSOM with SharePoint Online

This piece of code

string strUserName="abc";
string strPassword="123";
SecureString ssPwd = new SecureString();
strPassword.ToList().ForEach(ssPwd.AppendChar);
ClientContext context = new ClientContext(siteurl);
SharePointOnlineCredentials credentials = new SharePointOnlineCredentials(strUserName, ssPwd);

context.Credentials = credentials;
// The SharePoint web at the URL.
Web web = context.Web;

// We want to retrieve the web properties.
context.Load(web);

// Execute the query to the server.
context.ExecuteQuery();

      

Generates the following error message trying to connect to SharePoint Online:

For security reasons, DTDs are prohibited in this XML document. To enable DTD processing, set the DtdProcessing property on the XmlReaderSettings to parse and pass the settings to the XmlReader.Create method.

The same happens with the SharePoint Client browser downloaded from CodePlex ( https://spcb.codeplex.com ).

What happened? What can I do?

+3


source to share





All Articles