System.Xml.XmlException: hexadecimal value 0x02, is an invalid character

1,887 views
Skip to first unread message

Kannan

unread,
Nov 18, 2009, 3:08:49 PM11/18/09
to ELMAH, karm...@welldocinc.com
I’m getting the following XmlException error through Elmah.

System.Xml.XmlException: '[1]', hexadecimal value 0x02, is an invalid
character. Line 1, position 175.


This doesn’t give any specific page in the stack track (see below) and
more over the weird thing is that it is happening at frequent interval
(say exactly at 15 minutes).


Here is the stack trace:

System.Xml.XmlException: '[1]', hexadecimal value 0x02, is an invalid
character. Line 1, position 175.

at System.Xml.XmlTextReaderImpl.Throw(Exception e)

at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)

at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char
invChar)

at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32
startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32&
charCount, EntityType& entityType)

at System.Xml.XmlTextReaderImpl.ParseNumericCharRef(Boolean expand,
BufferBuilder internalSubsetBuilder, EntityType& entityType)

at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean
isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)

at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32
curPos, Char quoteChar, NodeData attr)

at System.Xml.XmlTextReaderImpl.ParseAttributes()

at System.Xml.XmlTextReaderImpl.ParseElement()

at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

at System.Xml.XmlTextReaderImpl.Read()

at System.Xml.XmlReader.MoveToContent()

at System.Xml.XmlReader.IsStartElement(String name)

at Elmah.SqlErrorLog.ErrorsXmlToList(XmlReader reader, IList
errorEntryList)

at Elmah.SqlErrorLog.GetErrors(Int32 pageIndex, Int32 pageSize,
IList errorEntryList)

at Elmah.ErrorRssHandler.ProcessRequest(HttpContext context)

at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously



Could you please let me know how to resolve this?

Drew Freyling

unread,
Nov 20, 2009, 7:39:42 PM11/20/09
to ELMAH
Where are you getting this error from? I'm guessing something is
trying to pull down the RSS feed every 15mins?
Message has been deleted

SRK

unread,
Dec 22, 2009, 1:24:25 PM12/22/09
to ELMAH
Hi,

There is no specific page. All we have is the information from the
stack trace.

System.Xml.XmlException: ' ', hexadecimal value 0x02, is an invalid


character. Line 1, position 175.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char
invChar)
at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32
startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32&
charCount, EntityType& entityType)

....

Is there a way to disable the RSS feed update.

Also, this issue is not coming up on weekends. Its so weird that it
happens on Mon - Fri.

Same issue was logged in previous version & it was fixed by adding the
code "CheckCharacters = false" in 3 files. But in the latest code it
is available ony in ErrorXMLHandler.cs & not in other two error log
files.


Thanks,

SRK

SRK

unread,
Dec 30, 2009, 2:01:56 PM12/30/09
to ELMAH
RESOLVED:

Its the problem with RSS feed. One of the bookmarks on the browser for
checking the ELMAH log details was pointing to PROD & it was trying
to get the feed every 15 mins.

Once we removed the bookmark the error stopped.

Hope it helps.

Thanks,

SRK

Atif Aziz

unread,
Jan 28, 2010, 5:04:34 PM1/28/10
to el...@googlegroups.com
You may be interested in starring this issue:
--

You received this message because you are subscribed to the Google Groups "ELMAH" group.
To post to this group, send email to el...@googlegroups.com.
To unsubscribe from this group, send email to elmah+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elmah?hl=en.



Reply all
Reply to author
Forward
0 new messages