No documents or folders appear when clicking on a SharePoint document library in MacroView DMF despite the library being populated.
If you encounter this issue, please generate an information level trace file and check to see if it contains the following error message:
System.Xml.XmlException: Hexadecimal value 0x[..] is an invalid character
If this error message appears please try the advice in this article.
When the DMF Client communicates with the DMF Service some responses are returned as XmlNode types.
If the SharePoint object model returns values that are invalid when included in XML, an InvalidOperationException is thrown when the response is deserialized by ASP.NET web services at the client.
The XmlTextReader does have a "Normalization" property which allows the XML reader to be more liberal and ignore invalid characters - but this option is not used within the automatically generated Web Service Client.
Identifying documents with invalid characters
Use the identifier utility available below to identify problem documents in SharePoint Online.
- To analyse a single library enter the URL of the library (as in the example).
- To analyse all libraries in a site enter the URL of the site AND tick "All libraries?"
If you have a huge number of documents in your library, and the problem only just started happening, you can speed it up by just searching for documents modified in the last few days.
As the problem only occurs in Office documents only the file types listed are checked.
When the application has completed click on "Open the log folder" to review the list of affected documents.
Remove Invalid Characters
This error can be resolved in a number of ways, once the offending file(s) have been identified (see below):
- Ensure that metadata column values do not include/contain any invalid characters (see table below).
- Office documents may also contain some of these invalid characters within their custom properties. To rectify this issue, the Office file must be deleted from SharePoint and then re-uploaded once the custom properties have been cleaned.
Note that you will need to open the document with the web browser before editing the document properties. The invalid characters will show as a square box.
To fix: Go to the File menu and select Info, then
Or in the Custom properties
List of Invalid Characters
(We have only seen problem occur with ASCII 11 and 21 but any of the following would trigger the same issue).
The following table details the characters that are not valid for web services XML serialization.