I have MVC application which has Kendo grid. The datasource's URL property is set to /Users/GetRequests . The application runs fine locally in visual studio. In production the application is hosted under virtual directory www.mycompany.com/dashboard
So when we deploy application to production its not working with the url /Users/GetRequests, however if i change the url to /Dashboard/Users/GetRequests then it works but then it will not work locally.
How can i set the relative URL to datasource?
$(document).ready(function() { $.ajaxSetup({ cache: false}); $("#dashboardTabs").kendoTabStrip(); $("#downloadGrid").kendoGrid( { dataSource: newkendo.data.DataSource({ transport:{ read: { url: "/Users/GetRequests", dataType: "json" } }, pageSize: 10 }), pageable: { refresh: true, pageSizes: [5,10,15,20] }, columns: [ { title: "Request Type", field: "RequestType", width: 85 }, { title: "Requested On", field: "RequestedOn", width: 75 } ] });});