I can able to get result ,if i called the WCF service only when i run the WCF alone.So WCF service is working fine
This a actual URL to get the Result :
http:
these are the parameters
/2015-01-25/2015-01-29/1/1
but when i make a request through AJAX,The HTTP request generating like below.
http:
So ,I'm not able to get a result ,How do i pass parameter ?
What I have tried:
$(function () {
$('#btnSubmit').click(function () {
var params = {
'FromDate': "2015-01-01",
'ToDate': "2015-01-29",
'PageIndex': "1",
'PageSize': "1"
}
debugger;
$.ajax({
url: "http://localhost:57946/MaterialIssueService.svc/MaterialServiceJson/GetMaterialIssued",
type: "Get",
data: JSON.stringify(params),
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (data) {
if (data.status == "Success") {
alert("Done");
} else {
alert("Error occurs on the Database level!");
}
},
error: function (ex) {
debugger;
alert(ex.responseText);
}
});
});
});