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
sharepoint csom sharepoint-online


source to share


No one has answered this question yet

Check out similar questions:

4
DTD denied error when accessing sharepoint 2013 / office365 list (but not openly aware of XML usage)
1
Retrieve data from the Sharepoint Online SharePoint News Feed using CSOM
1
Get localized list / site name from SharePoint 2013 based on CSOM
1
Updating SharePoint Online Columns / Content Types with CSOM
1
Default value for a SharePoint Online CSOM site column
1
Failed to authenticate SharePoint REST or CSOM calls with .NET Core
1
CSOM Redirecting Documents to OfficeWebApp / OfficeOnline Using SharepointOnlineCredentials
1
Linqpad Cannot Connect to Sharepoint
0
How do I get an exchange object from SharePoint Online using CSOM?
0
ILMerge with CRM plugin and Sharepoint Online



All Articles
Loading...
X
Show
Funny
Dev
Pics