Web Service corrupting data - Carriage returns getting removed

From: Srikanth (bryn_at_nospam.bryn.com.au)
Date: 02/23/04


Date: Mon, 23 Feb 2004 17:47:12 +1100

Hi,

I have a winforms application which passes data to a Web Service. The string
data is read from a file and passed on to the Web Service.

Before passing, the string looks like:

"HEAD~5302143~99~59073341483~AUMEL~20-02-2004~E~O~1670~4~2\r\nLINE~1~AAAAEGX
9Y~~700~2~5908089083~Some Name~Goods
description~MY\r\nLINE~2~~EXPE~900~~6876876433~Owner1~Description1~NZ\r\nLIN
E~3~AAAAEFLE7~~70~~~~~\r\nLINE~4~AAAHK45G3~~~2~~~~"

Please notice the bold characters.

In the Web Method, the above string is received as:
"HEAD~5302143~99~59073341483~AUMEL~20-02-2004~E~O~1670~4~2\nLINE~1~AAAAEGX9Y
~~700~2~5908089083~Some Name~Goods
description~MY\nLINE~2~~EXPE~900~~6876876433~Owner1~Description1~NZ\nLINE~3~
AAAAEFLE7~~70~~~~~\nLINE~4~AAAHK45G3~~~2~~~~"

Please notice the bold characters.

The "Carriage returns " are getting removed. My application requires that
the

carriage returns are included in the string as the Web Service submits this
string to

BizTalk server which requires carriage returns for parsing.

I have to solve this problem very urgently for my project.

Any help is appreciated.

Thanks & Regards,

Srikanth.