This example demonstrates how to send authenticated requests to the OData service. The main idea is to handle the ODataContext.beforeSend event and add login information to the header of your request.
The How to process authenticated requests on the OData service example demonstrates how to process requests on the server side.
Question Comments
Added By: Phil Jenson at: 1/28/2013 3:12:21 AM
I believe 'beforeSend' function should be a member of the ODataContext and not a member of the CategoryList object.
Added By: Hasan Baidoon at: 7/9/2013 10:33:08 PMHi,
I want to know if this method for Basic Authorization works when JSONP is enabled.
Thanks.
Added By: Onkelinx Ghislain at: 2/13/2014 2:06:23 PMWhich version of visual studio works this example?
Added By: surekha at: 11/3/2015 2:26:49 AMTHis code is not worrking. error comes app not defined. how i can resolve this error.
Added By: Mark Hartmann at: 11/3/2015 2:34:36 AMChange line "app.navigate('Login');" to navigate to your login page according to your other code.
Added By: Nikolai (DevExpress Support) at: 11/3/2015 7:32:12 AM Hi Guys,Surekha, please follow the recommendations from the Mark's comment. If this does not help, describe how we can reproduce the issue with this example. We will do our best to assist you.Added By: Luong Tu at: 11/29/2015 6:16:39 PM
this example isn't working for me
Added By: MohammedFarooq at: 11/29/2015 9:41:15 PMHi Nikolai,
This example seems to be incomplete as it doesn't have the OData Service project included in it to demonstrate the functionality.
I would appreciate if you can create the ODataService project and demonstrate the example fully.
Added By: Nikolai (DevExpress Support) at: 11/29/2015 11:45:37 PM Hi Guys,Please take a closer look at the example description. It contains a link to the required examaple that demonstrates how to process requests on the server side.Added By: saliha mali at: 12/27/2015 7:22:19 AM
please I'm getting this error
"Error: 'ReferenceError: app is not defined', line 14, file 'http://localhost:64254/views/login.js'"
Can you help me for this?
Added By: Nikolai (DevExpress Support) at: 12/28/2015 1:03:28 AMHello Saliha,
To process your recent post more efficiently, I created a separate ticket on your behalf: T328732: Cannot test the E4460 example due to the "app is not defined" error. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.