Data at the root level is invalid. Line 1, position 1. Error when uploading to library

  • Updated

When trying to upload an image to the Library, you may get an error of "Data at the root level is invalid. Line 1, position 1. "  

Often this is caused by invalid XHTML being handled, but sometimes it can be due to your configuration. 

You may have an incorrect setting in your Web.config file

Open your Web.config file and search for the <add key="ek_EnableDeviceDetection" value="XXX" />  tag.  If it is set to true, set it to false: 

<add key="ek_EnableDeviceDetection" value="false" />  

If you continue to receive that error, you'll need to check that your XHTML is valid in your files.