XML serialization of illegal character entities

M

Mike McGranahan

Hello,

My wsdl.exe-generated, ASP.NET 1.1 web service pulls data from the local
Exchange 2003 store using CDO 2000 and returns it to consumers. CDO
occasionally returns (char)1, (char)5, and (char)12 from Exchange.
These are illegal characters in XML 1.0
(http://www.w3.org/TR/2004/REC-xml-20040204/#charsets), yet .NET still
serializes them into character entities, e.g.  . When .NET 1.1
consumers attempt to deserialize this, they receive an XmlException,
e.g. "'', hexadecimal value 0x05, is an invalid character. Line 1,
position 326." referring to the first appearance of an illegal character
entity. I don't believe I have altered the default serialization behavior.

According to an MSDN article, the XmlTextReader used by the ASP.NET Web
Services deserializer has its Normalization property set to false, which
causes the deserializer to throw the exception (See "Deserializing
Invalid XML" here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp)

Is it possible to exchange strings with these characters using ASP.NET
1.1 Web Services? Have I configured something problematically? Is it
possible to change the XML deserializer behavior? Or is it possible to
configure the XML serializer to generate XML that will not cause this
behavior in the deserializer? Are there other relevant considerations
or recommendable techniques that could be helpful?

Thanks for any assistance.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top