My RESTful WCF 3.5 service accepts an XmlSerialized (as opposed to DataContract serialized) data object which contains a freeform string field.
The client I wrote (which uses HttpWebRequest / HttpWebResponse to interact with the WCF service) sends XML like this:
<product>
<description>Foo\r\nBar\r\n\r\nFinal line</description>
</product>
(The CR and LF characters are escaped here for legibility, in reality the raw ASCII bytes 0x0A and 0x0D are sent down the wire, as confirmed with Wireshark).
However my WCF service's [OperationContract]-marked methods all report that the Product.Description property has the value "Foo\nBar\n\nFinal line". This happens before any of my code is called.
Somewhere in WCF the \r\n newline characters in strings are being removed and replaced with \n newlines, but I can't see where or why this is happening.