Hello,
I am trying to visualize data from our company's server through Kendo Grid. The data itself is avabile through secure WCF service over HTTPS with authentication. Since the server is in another domain and we need the authentication, i have to use CORS. Without authentication it works just fine using jasonp, but unforunattely that's not an option for us. So my code looks something like this:
I am using odataCors extension, which i found somewhere here on the forums. Requestwise it looks allright and it works like it should when i call DS.read() - ajax sends OPTIONS message with Origin, server responds with adequate headers, ajax sends GET message with auth cookie and server returns valid jsonp odata.
Trouble begins when i want to attach this datasource to the grid. It doesn't work, it seems like it is processing a response from the OPTIONS response and not from the second one, which actually returns data.
Is there a way to make it work? Any help would be appriciated very much!
Thank you.
I am trying to visualize data from our company's server through Kendo Grid. The data itself is avabile through secure WCF service over HTTPS with authentication. Since the server is in another domain and we need the authentication, i have to use CORS. Without authentication it works just fine using jasonp, but unforunattely that's not an option for us. So my code looks something like this:
var
DS =
new
kendo.data.DataSource({
type:
"odataCors"
,
transport: {
read: {
url:
"https://.../TestData"
,
crossDomain:
true
,
withCredentials:
true
,
beforeSend:
function
(req) {
req.setRequestHeader(
"Authorization"
,
"Basic"
+ auth);
}
}
}
});
Trouble begins when i want to attach this datasource to the grid. It doesn't work, it seems like it is processing a response from the OPTIONS response and not from the second one, which actually returns data.
Is there a way to make it work? Any help would be appriciated very much!
Thank you.