Hello,
I am facing a strange problem. I have webservice that is running pretty good on its url. I am consuming it using jQuery and all methods are working fine but one method throw error of 404 with readystate 4. I have checked the url and it is correct. I don't know why this is happening.
This is my Code :
$.ajax({
type: 'POST',
cache: false,
url: "http://ajayp/WebService2.8/XYZasmx/GetXYZ",
contentType: 'application/json; charset=utf-8',
data: "{ReportID: '" + RptNR + "'}",
dataType: 'json',
success: function (e) {
if (e.d != null) {
SetFields(JSON.parse(e.d));
}
else {
alert("Invalid Case Number");
}
},
error: function (e) {
alert(e.responseJSON);
},
fail: function (e) {
debugger;
}
});
My VB Code :
Public Function GetRacialProfilingDataByReportID(ByVal ReportID As String) As String
Try
Return "Ajay Patel"
Catch ex As Exception
Throw ex
End Try
End Function

Ajay PatelPosted Apr 24, 2014, 6:18 AM
Thanks for reply. I know about 404 error but in this case I have page at same path and I can able to open that webservice in browser. But not from JQuery code
Shweta LodhaPosted Apr 22, 2014, 10:26 AM