TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ajay Patel
NA
147
255.8k
Call webservice using JQuery reflect 404 error
Apr 22 2014 3:13 AM
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 :
<WebMethod()> _
<System.Web.Script.Services.ScriptMethod(ResponseFormat:=System.Web.Script.Services.ResponseFormat.Json)>
Public Function GetRacialProfilingDataByReportID(ByVal ReportID As String) As String
Try
Return "Ajay Patel"
Catch ex As Exception
Throw ex
End Try
End Function
Reply
Answers (
2
)
Asp.Net Java Script COde For Jquery Calender
how to add a close button to a menu item using jquery