Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to call WebMethod from cross domain
Ajay Saini
Jun 17 2015 5:58 AM
680
Reply
I want to call a WebMethod in my application hosted on different server and url, but fails every time.
My code is :
$.ajax({
url: 'http://xyz.com/ATAServices/ServicePage.asmx?CallWebServiceUsingJson',
type: "GET",
crossDomain: true,
async: false,
data: JSON.stringify({ UserName: $('#txtUserName').val(), UserPassword: $('#txtUserPasssword').val(), SiteName: '1' }),
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (data) {
},
error: function (ts) {
alert(ts.responseText)
}
});
Please help me to use Cross Domain webmethod
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How Can i Provide Security in Web Services???
Call soap 1.1 web method