none
Call REST share point in asp.net by javascript RRS feed

  • Question

  • Hello,

      I write the following JavaScript in asp.net to call Rest share point :

          $.ajax({
                            type: 'GET',
                            headers: {
                                'accept': 'application/json;odata=verbose'
                            },
                            url: "http://server/sites/Dhofar/en-us/_api/web/lists/GetByTitle('MenuList')/items?$select=Title",
                            success: function (data) {
                                console.log(data);
                            }
                        }); 

    I get the following error :

        XMLHttpRequest cannot load http://server:9090/sites/Dhofar/en-us/_api/web/lists/GetByTitle('MenuList')/items?$select=Title. No 'Access-Control-Allow-Origin' header is present on the requested resource.

    How Can I solve it ?


    ASk

    Wednesday, June 25, 2014 7:31 AM

Answers

All replies