I have the below code in a webservice to read the post data. The issue here is whenever the request contains special character, lets say "amé", the character is replaced as am� while converted to string.
byte[] postData= HttpContext.Request.BinaryRead(HttpContext.Request.ContentLength);
string strReq = Encoding.UTF8.GetString(postData);
And I call the WebService with the below code:
WebClient webClient = new WebClient();
webClient.Headers["Content-type"] = "text/xml; charset=utf-8";
webClient.Headers[HttpRequestHeader.Authorization] = credentials;
string output = webClient.UploadString(url, "POST", input);