while am trying to connect android app with wcf service in vb.net i can send data as well, but if text contain ÿ or � i got 400 bad request: The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation. Encountered unexpected character 'ÿ'
android http code:
HttpClient httpclient = new DefaultHttpClient();
HttpPost request = new HttpPost(URL + "/" + funName);
request.addHeader("Content-Type", "application/json; charset=utf-8");
request.addHeader("Accept", "application/json; charset=utf-8");
request.setEntity(new ByteArrayEntity(post.getBytes(HTTP.UTF_8)));
wcf server side:
<WebInvoke(Method:="POST", RequestFormat:=WebMessageFormat.Json, ResponseFormat:=WebMessageFormat.Json, BodyStyle:=WebMessageBodyStyle.Wrapped, UriTemplate:="uploadfile")>
how can i handle it??