skip to Main Content

Until Friday Last week sharepoint CSOM code was working fine. Suddenly, it stopped working.

After exploring on Google, we changed VM DNS to 8.8.8.8 / 8.8.4.4 and it started working for sometime and again it stopped working.

Not sure what is happening. Can someone help?

Tried DNS Change to 8.8.8.8 / 8.8.4.4

2

Answers


  1. The "Root element is missing" error typically occurs when there is an issue with the XML formatting of a response or request in SharePoint Client Object Model (CSOM) communication. Here are a few common reasons and solutions for this error:

    Empty Response or Invalid XML:

    Check if the response you’re getting from SharePoint CSOM is empty or not well-formed XML. If the response is empty or doesn’t contain a valid XML root element, it can trigger this error.
    Ensure that the CSOM request is being formed correctly and is sending the necessary information to SharePoint.

    Incorrect Content Type:

    Ensure that the content type specified in the request headers is correct. The content type should be set to "application/xml" or "text/xml" depending on the scenario.

    Encoding Issues:

    Check if there are any encoding issues with the XML data being sent or received. Ensure that the XML data is encoded properly, and the encoding type is specified in the headers.

    Login or Signup to reply.
  2. We’ve recently had this error on two previously working customers. In our case, it was caused by the servers connecting to SharePoint being unable to resolve msoid.customerdomain.com. One was missing, the other had no entry on their internal DNS. Instead the DNS server returned an IP for msoid.com, which didn’t return the expected XML document, and hence the error in your post. I think MS must have changed something in CSOM so it does a DNS lookup to msoid.customerdomain.com where it was not before. To fix the issue, we created a cname record pointing msoid.customerdomain.com to clientconfig.microsoftonline-p.net.

    Reading up on this further I’m not sure if this was strictly the right thing to do as it looks like the DNS entry is no longer required by Microsoft.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search