Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

Consumeing SAP ODATA service from .Net

$
0
0

Dear All

I have created a odata service and registered it in Gateway.

 

http://myname:8000/sap/opu/odata/sap/ZGL2_SRV/GLListSet

 

I am able to get the output in browser.

 

But when I call this service from the .net application, I am getting 401 Authentication error.

Can someone help me ?

 

1. Any specific thing that I should supply in the request header..?

Or

2. Any server side authentication to be provided?

 

 

my .netcode is like this.

 

$.ajax({

 

 

                url: q,

                type: "GET",

                dataType: "xml",

                beforeSend: function (req) {

                    req.setRequestHeader("Authorization", "Basic dmVua2F0OjEwMDNNYXJjaCQ=");

                },

 

 

Regards,

Venkat


Viewing all articles
Browse latest Browse all 2823

Trending Articles



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