Consumir el servicio WCF / REST usando JQuery ajax post
Estoy intentando publicar los datos usign $ .ajax, pero recibo el mensaje de error 400 error. El siguiente es el código:
$.ajax({
url: "http://192.168.1.9:150/Service.svc/usrregistration",
type: "POST",
// data: '{"Firstname":' + Firstname + ',"LastName:"'+LastName+'}',
data: '{"Firstname":"rose"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
processdata: true,
success: function (msg) {
alert(msg);
alert('Registerd successfully');
},
error: function (msg) {
alert('Faild'+msg.status);
}
});