Bug Vanquisher

28 September 2009

Solution to XmlTextReader’s Fiasco

Filed under: Fun, Tips — Tanveer Badar @ 10:22 PM

He’s not that knowledgeable. Mr. pretentious. And he didn’t try this either:

”, hexadecimal value 0x1B, is an invalid character. Line 46, position 128.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: ”, hexadecimal value 0x1B, is an invalid character. Line 46, position 128.

The simple solution is to set CheckCharacters = false; And since you would like to know what the heck am I talking about? XmlTextReader is in the bad habit of failing over Unicode characters.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: