wcf - HTTP POST RETURNING BAD REQUEST ERROR 400 FROM ANDROID HTTPURLConnection -
i using httpurlconnection class connect android application wcf web service. using microsoft network monitor trace request , hits server thus.
- http: request, post /ieservice/service.svc/register_user
command: post uri: /ieservice/service.svc/register_user
location: /ieservice/service.svc/register_user protocolversion: http/1.1 useragent: dalvik/2.1.0 (linux; u; android 5.0.2; a0001 build/lrx22g) host: win-server connection: keep-alive accept-encoding: gzip contenttype: application/x-www-form-urlencoded mediatype: application/x-www-form-urlencoded contentlength: 183 headerend: crlf payload: httpcontenttype = application/x-www-form-urlencoded last_name: l_one birthday: bd_one email: e_one username: u_one business_location: bl_one security_answer: sa_one security_question: s_one first_name: f_one password: p_one imei_number: imei_one
however, bad request error 400. cannot see wrong request. problem?
the problem in wcf service method. had add bodystyle:=webmessagebodystyle.wrappedrequest method header.
and worked.
Comments
Post a Comment