I have a plugin that reads an XML file. The plugin fails with the following error:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Data at the root level is invalid. Line 1, position 1.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
I've tried following headers in the XML file but none of them seem to work:
<?xml version="1.0" standalone="yes"?>
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
My XML does have an 'en-dash' character. The funny thing is that, the same code that runs the plugin also runs in a console app and it works perfectly.
What are my options?
*This post is locked for comments