Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ajax web service call access denied

$
0
0

Hi,

I am calling a webservice(.asmx) by AJAX from a HTML page. It works fine locally but when deplpoyed to servers I am getting Access denied in web service call. The HTML and the services are in different servers, different domain. 

Can someone please help me in fixing the issue? 

function GetConfig(ConfigKey) {
    alert('In the method GetConfig');
    var returnvalue = 0$.support.cors = true;$.ajax({
        url:'http://MyWebService.asmx/Getvalues',
        type: 'GET',
        data: { ConfigrationKey: ConfigKey },
        async: false,
        contentType: "application/json; charset=utf-8",
        success: function (data) {
            returnvalue = parseInt(data.documentElement.textContent);
            alert('success' + returnvalue);
        },
        error: function (xhr, status, error) {
            alert("Service Call not successful!" + error);
            returnvalue = 0;
        }
    });
    return returnvalue
}


Viewing all articles
Browse latest Browse all 5678

Trending Articles