AnsweredAssumed Answered

Failed to retrieve file content. Error: An XML declaration is required for all non-UTF8 documents

Question asked by tapologo on Feb 27, 2018
Latest reply on Feb 27, 2018 by krishnachaluvadi

Hi all

 

I am trying to import file from our Dev to Prod but i'm getting below error message.

 

 

Searching ULS logs for this Correlation ID I found these messages. 

--------------------------------------------------------------------------------------------

Failed to retrieve file content. Error: An XML declaration is required for all non-UTF8 documents.. Stack trace:
at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Byte b1, Byte b2, Byte b3, Byte b4, Boolean notOutOfBand, Int32& preserve)
at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Boolean notOutOfBand)
at System.Xml.EncodingStreamWrapper..ctor(Stream stream, Encoding encoding)
at System.Xml.XmlUTF8TextReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream)
at Nintex.Forms.NfUtilities.DeserializeObjectWithDataContractSerializer(String xml, Type type)
at Nintex.Forms.NfUtilities.DeserializeObject(String xml, SerializationType method, Type type)
at Nintex.Forms.FormsHelper.XmlToObject(String formMarkup)
at Nintex.Forms.SharePoint.ApplicationPages.ImportForm.GetLocalFileContent(String fileName)

--------------------------------------------------------------------------------------------

Failed to handle import form post back. Error: An XML declaration is required for all non-UTF8 documents.. Stack trace:
at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Byte b1, Byte b2, Byte b3, Byte b4, Boolean notOutOfBand, Int32& preserve)
at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Boolean notOutOfBand)
at System.Xml.EncodingStreamWrapper..ctor(Stream stream, Encoding encoding)
at System.Xml.XmlUTF8TextReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream)
at Nintex.Forms.NfUtilities.DeserializeObjectWithDataContractSerializer(String xml, Type type)
at Nintex.Forms.NfUtilities.DeserializeObject(String xml, SerializationType method, Type type)
at Nintex.Forms.FormsHelper.XmlToObject(String formMarkup)
at Nintex.Forms.SharePoint.ApplicationPages.ImportForm.GetLocalFileContent(String fileName)
at Nintex.Forms.SharePoint.ApplicationPages.ImportForm.RaisePostBackEvent(String eventArgument)

-----------------------------------------------------------------------------------------------

Application error when access /_layouts/15/NintexForms/ImportForm.aspx, Error=An XML declaration is required for all non-UTF8 documents.
at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Byte b1, Byte b2, Byte b3, Byte b4, Boolean notOutOfBand, Int32& preserve)
at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Boolean notOutOfBand)
at System.Xml.EncodingStreamWrapper..ctor(Stream stream, Encoding encoding)
at System.Xml.XmlUTF8TextReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream)
at Nintex.Forms.NfUtilities.DeserializeObjectWithDataContractSerializer(String xml, Type type)
at Nintex.Forms.NfUtilities.DeserializeObject(String xml, SerializationType method, Type type)
at Nintex.Forms.FormsHelper.XmlToObject(String formMarkup)
at Nintex.Forms.SharePoint.ApplicationPages.ImportForm.GetLocalFileContent(String fileName)
at Nintex.Forms.SharePoint.ApplicationPages.ImportForm.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Outcomes