Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to send authenticated requests to the OData service

$
0
0

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 PM    

Hi,

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 PM    

Which version of visual studio works this example?

Added By: surekha at: 11/3/2015 2:26:49 AM    

THis 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 AM    

Change 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 PM    

Hi 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 AM    

Hello 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.

Added By: saliha mali at: 12/29/2015 12:41:55 AM    

It's ok. I prefixed the "app" with the name of my application. Now the error is not displayed. (Guess I get it)
but i'd like to know where should I put the db.js?  Is it in the same folder as "login" and "index" ?
Because I got this error :
"Error: 'TypeError:  TestApp.db is undefined', line 4, file 'http://localhost:54294/views/index.js'."

Added By: Nikolai (DevExpress Support) at: 12/29/2015 1:01:42 AM    Saliha,

You can place the db.js file into any folder. The main requirement is that a reference to this file should be placed before a reference to index.js. 

Added By: saliha mali at: 12/29/2015 1:33:42 PM    

I did not understand what does "db.js" really do?

Here are the sequence of ideas in my head:

1- User enter his (UserName & password) then click LoginButton
2- the index page is shown and it is expected to display a list of categories. The data source of this page is the "CategoryList"

Now I don't understand what is exactly the "categoryList". Is it a table in the DB which is linked to My OdataService?
what do this two lines mean :
key: "CategoryID",
name: "Categories"

So briedfly I need more explanation to make the db.js clear in my head?
thks to help.

Added By: Nikolai (DevExpress Support) at: 12/30/2015 12:36:45 AM    Saliha,

I kindly ask you not to post the same comments in different tickets. Let's discuss this issue in the Cannot test the E4460 example due to the "app is not defined" error ticket.Added By: Şule ışık at: 4/22/2016 12:40:20 AM    Hi,
I try login app. But  I  receiving error. this error is 

Uncaught ReferenceError: Unable to process binding "dxTextBox: function (){return { value:txtUsername} }"
 What is the problem? Added By: Şule ışık at: 4/22/2016 12:59:00 AM     When I wrote "value: anything" , I'm getting error .  Why?

Added By: Nikolai (DevExpress Support) at: 4/22/2016 3:52:42 AM    

Hello Şule,

I've created a separate ticket on your behalf (T370893: The E4460 example throws error). It has been placed in our processing queue and will be answered shortly.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>