Reputation: 8626
I have hosted a service sucessfully on IIS.
Made sure that application is running.
I have given call to this service through ajax as:
var parameters = {
'EmailID':EmailID,
'Password':Password
};
$.ajax({
url: "http://localhost:85/MobileECommerceTesting/Service1.svc/validateLogin",
data: JSON.stringify(parameters),
contentType: "application/json; charset=utf-8",
dataType: "json",
type: "POST",
cache: false,
success: function (Data) {
alert("asdsad");
},
error: function () {
alert("Error in Saving.Please try later.");
}
});
But its not giving call to the service.
What can be the problem?
EDIT:
EDIT2 :
Network Tab:
Upvotes: 0
Views: 102
Reputation: 1582
Take a look at this question:
It might be related to your binding, which does not expect the content type application/json. You must use webHttpBinding to create "REST-like" services with WCF.
Upvotes: 1