VERY ODD -- XML exception but no clue why

K

KatB

Hi, I have an intranet asp.net app. I use an xmlDoc (saved into SQL
Server as ntext). I retrieve/update this string frequently (but it is
unique to one user at a time). One of my users did several clicks to
retrieve/save this string very quickly (not sure that could/would cause
this), but, anyhow he then got this error:

vb.net code:

Dim xDoc As New XmlDocument()
xDoc.XmlResolver = Nothing
xDoc.LoadXml(varWF) --line 358 (see ref below)

ERROR:

Error message from Global.asax: System.Xml.XmlException: This is an
unexpected token. The expected token is 'EndElement'. Line 1, position
8111.
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at OWI_NextGen.WIleft.txtScan_TextChanged(Object sender, EventArgs e)
in C:\Inetpub\wwwroot\OWI_NextGen\WIleft.aspx.vb:line 358
at System.Web.UI.WebControls.TextBox.OnTextChanged(EventArgs e)
at
System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.Rai
sePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain()

THE REALLY STRANGE PART:

Even restarting IE (5.5) and loading the page new, the error kept
occurring at this point in the code (also tried diffent PCs). I looked
at the ntext string and all appeared ok (no missing end elements, etc.)
-- BTW, this same string worked fine up till then.

Just guessing, I deleted the DTD processing instruction from the string
and that fixed the problem. I then put the DTD PI back and it still
worked ok.

ANY IDEAS on how/why this happened? I've never seen this before and I've
been testing this app for quite a while. Haven't been able to reproduce
it...but now it worries me.

Thanks, Kat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top