ASP.NET Application to consume OData URL output and present data RRS feed

  • Question

  • Does any one have came across any project/code to Create ASP.NET Application with Gridview to display CRM data using Dynamics CRM OData URL??

    I try to create simple asp.net application using visual studio with simple JQuery syntax like below, but for some reason this does not work. If i create simple HTML page using NotePad++ and use this code, it works.

    Any idea what am i doing wrong or do i need to pass any authetication token when i use visual studio or any thing else??

                type: "GET",           
                datatype: "json",
                crossDomain: true,
                beforeSend: function (XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader("Accept", "application/json");
                    XMLHttpRequest.setRequestHeader("Content-type", "application/json; charset=utf-8");
                url: "https://testserver/testorg/XRMServices/2011/OrganizationData.svc/OpportunitySet?$select=CreatedOn,EstimatedCloseDate,Name,OpportunityId",
                async: false,
                success: function (data, textStatus, xhr) { debugger; alert(data); },
                error: function (xhr, textStatus, errorThrown) {
                    alert(textStatus + " " + errorThrown);

    Thursday, October 8, 2015 7:06 PM