Hi all,
I am working on project where 2 web application need to communicate with each other (1 way communication).
The first web app POST xml data to our web app.
Whenever there is special caracters in the xml data, the reciver get corrupted data.
Is there a way to avoid this in the reciver app ?
I know i can use some HtmlEncrypt/HtmlDecrypt but if possible i dont want to force the client to do any work.
What I have tried:
Here is the xml sending code :
<pre>HttpResponse response = HttpContext.Current.Response;
response.Clear();
StringBuilder s = new StringBuilder();
s.Append("<html>");
s.Append("<body onload='document.forms[\"form\"].submit()'>");
s.AppendFormat("<form name='form' action='{0}' method='post'>", url);
s.AppendFormat("<input type='hidden' name='xmlData' value='{0}' />", xmlData);
s.Append("</form></body></html>");
response.Write(s.ToString());
response.End();
This is just for tests purpuses, i have no idea hwo the client will do this, nor the technologies he uses.
And this is the Get POST xml
<pre>private string GetPostXmlData()
{
string[] keys = Request.Form.AllKeys;
string value = String.Empty;
if (keys.Length > 0)
value = Request.Form[keys[0]];
return value;
}
thanks.