Hi
We have a solution where we in our .Net API use Aspose to generate dynamic reports, where our customers define a Word template which we then populate with data, converts to PDF, and then return the PDFdocument.
This works fine 99.9% of the time.
But today, registered for the third time in 3-6 months suddenly it breaks, and every function in the API creating a PDF from Docx is broken.
Restarting the API fixes the error, and all is good again.
It is not easy to recreate in a sample application as we have no idea to what happens or is causing this.
We get this stacktrace from our application.
System.ArgumentException: The namespace declaration attribute has an incorrect ‘namespaceURI’: ‘http://www.w3.org/2000/xmlns/’.
at System.Xml.XmlDocument.AddAttrXmlName(String prefix, String localName, String namespaceURI, IXmlSchemaInfo schemaInfo)
at System.Xml.XmlDocument.CreateAttribute(String prefix, String localName, String namespaceURI)
at System.Xml.XmlDocument.CreateAttribute(String name)
at System.Xml.XmlElement.SetAttribute(String name, String value)
at #=z7btlXgHixUKCmbV5JB3IOmOtSn016nLAK3GsFXo=.#=z_AJkM7M=()
at #=zu6AdRgQQR8r3Yj$A4nwTdAAIOd9CKWZqK1wOWSY=.#=zLuZ_80fCIoLC(XmlWriter #=zwAMIOpE=, #=zSxFGcqTS98TiTLFs5WUEvdKLW2sb15FgzEH9pYM= #=z4ckI9p8=)
at #=zu6AdRgQQR8r3Yj$A4nwTdAAIOd9CKWZqK1wOWSY=.#=zLuZ_80fCIoLC(Stream #=zRtGho4o=, Int32 #=zzovA47A=)
at #=z2bf_Y9PL$CLSpDtNy_vJP_3AxAXFkUQNwFU4osU=.#=zCYeAl50=(#=zu6AdRgQQR8r3Yj$A4nwTdAAIOd9CKWZqK1wOWSY= #=zJeHmlck=, Boolean #=zeKj$kFwu5Sz_)
at Aspose.Pdf.Document.#=zfFL1ws0=(#=z8bUdn7NB3HniUI$5rsmHmMh_8aU3 #=z4pQ1zvM=, Metadata #=zINv2DAA=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zlSFtZF3LWTWDymgFL$Dmg2Dut09Kwwg4JvfrkDc=(Object #=znWxZeC0=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zcOMt1$BywVdYJE3Ujt5qKW$3LD6PY$UvVl5hwbM=(MethodBase #=znWxZeC0=, Boolean #=z0q$sHwg=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zJIXFSVJDdx$Q5Bnh2osjoKU=(#=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI= #=znWxZeC0=, #=qfTjkMLvhcrB7qxIOrZgPBNk_hKdLj9eQcG6djEAg8HU= #=z0q$sHwg=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=z63onGMbEV0HXUrC48hZr$HxSWsR6eDg25A==()
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zsjK_fV9uaEWWRq10faifSNFz3bXWXg65xw==(Boolean #=znWxZeC0=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zlSFtZF3LWTWDymgFL$Dmg2Dut09Kwwg4JvfrkDc=(Object #=znWxZeC0=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zar9iKCrjVfcTtHldpK3T4KoCC4A5VHJEWKWD1VEijAZi()
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zRwnJkxaXRO4$$qyMqxd_2dIlya5a(Object #=znWxZeC0=, UInt32 #=z0q$sHwg=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zsjK_fV9uaEWWRq10faifSNFz3bXWXg65xw==(Boolean #=znWxZeC0=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zB__sY1nnx$ESQCDkJcSG1TjkLydDAfB2oiy9kOQ=(Object[] #=znWxZeC0=, Type[] #=z0q$sHwg=, Type[] #=zx1hOoR8=, Object[] #=zDQZuDLg=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=z$pgZ5tp_J$X5EIpXGGHxKXLjuBazFwH9Jg==(Stream #=znWxZeC0=, String #=z0q$sHwg=, Object[] #=zx1hOoR8=)
at #=qcfljQivUJApbEjFoNUmIJZrVRINIisFMc9ncnhlLhVI=.#=zo_48T5IxlBNxPdRWmMB_CLissqoDV48HT2dZlso=(Stream #=znWxZeC0=, String #=z0q$sHwg=, Object[] #=zx1hOoR8=)
at Aspose.Pdf.Document.#=zWpTMNTSWhKCW(Stream #=z39JYGBU=, SaveOptions #=z7E92puekiEfC)
In this case we just seem to call Aspose.Pdf.Document.Save() and not much more.
We are running in production with Apose 21.12 at the moment.
Is this a known bug that you have fixed in the last year. Or is this new to you. Or are we doing something wrong?
I hope you are able to provide some feedback though I am fully aware that we have very little information to start from.
Best regards
/Anders