.Net Streamwriter putting exclamation mark in XML feed

canepos

New Member
When using HttpWebRequest to submit xml post data to a remote server, it inserts exclamation marks throughout the xml data when it sends it, causing the SOAP server to reject it and abort the connection. I have a HTML form submitter and it submits the xml in a textarea just fine without errors.Here is my basic page logic for submitting the xml data, I have tried using the byte array as well but got the same errors.\[code\]Dim submitPage As HttpWebRequest = WebRequest.Create(requestUrl)submitPage.Method = "POST"Dim postData As StringBuilder = New StringBuilder()postData.Append("Submit+XML=Submit&xmldata="http://stackoverflow.com/questions/11083184/& System.Web.HttpUtility.UrlEncode(CompiledXML))Dim writer As StreamWriter = NothingsubmitPage.ContentLength = postData.ToString().Lengthwriter = New StreamWriter(submitPage.GetRequestStream())writer.Write(postData.ToString())writer.Close()\[/code\]So what happens here is is takes my XML string and puts it in the post but it also puts in exclamation marks about every 10 lines.I have been working on this problem a couple days with no luck.
 
Back
Top