I want to access external web service using ajax call.

I access http://services.odata.org/Northwind/Northwind.svc/Customers web service in ajax call on site pages. but it is giving me error

Access Denied

1 Answer 1


Paste your web service URL directly in browser to check whether it asks for credentials if it is then pass credentials something like this

jQuery(document).ready(function() {
        url: url,
        type: 'POST',
        data: {
          username: id,
          password: pass
        success: function(content) { alert('ok'); },
        error: function(XMLHttpRequest, textStatus, errorThrown) {   
        complete: function() {.. };

change id and pass as per requirment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.