Quantcast
Channel: SCN : Discussion List - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3131

How to authenticate to my first ODATA service in HANA trial cloud?

$
0
0

Hi,

 

I try to pull data from my very first ODATA service created in SAP Hana trial cloud. I can do it be entering the corresponding URL in Browser. I am asked for my credentials and after that I can see the data I would likt to provide as xml. But if I try to do it in a small C# app, I fail. Maybe someone has an idea what's the pitfall.

 

WebRequest request = HttpWebRequest.Create(new Uri("https://s7hanaxs.hanatrial.ondemand.com/p13XXXXXXXtrial/hihanaxs/TodoApp/todo.xsodata"));

todoService.Credentials = new NetworkCredential(username, password);      

    

var todos = todoService.TODO.ToList();

foreach (var todo in todos) {

    MessageBox.Show(todo.DESCRIPTION);

}

I double checked the username an password. The todo-object is the service reference I added from metadata-file in VS (without problems).

 

I think it's a problem with the credentials because a plain webrequest ends up in the markup for login mask.

 

best regards

 

Benjamin


Viewing all articles
Browse latest Browse all 3131

Trending Articles



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