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

CSRF token validation failed - ODATA

$
0
0

Hi Expert,

 

When i am fetching data  throw ODATA it's working fine.

 

 

When i am pushing data throw Gateway Client ( /IWFND/GW_CLIENT) . it's also working fine.

 

Below is screen Shot of /IWFND/GW_CLIENT tcode.


Below is CSRF Token.

HTTPReq.PNG

Below is Status after data pushing.

HTTPRes.PNG

 

 

But when i am pushing data throw .NET application it's showing error "CSRF token validation failed"

 

Below screen shot of .NET  Error.

HTTP Error.PNG

 

Below is C# (.NET) code for generating CSRF Token.

 

Method 1 .

CSRF Token.PNG

 

Method 2.

CRSF Token 2.PNG

 

above code is generating CSRF Token Successfully.

 

when pushing data throw .NET Application. it's throwing below error.

HTTP Error.PNG

 

 

i am trying multiple scenario but it's not working properly. throwing error on " Client.SaveChanges()  " or " Client.UpdateObject() "

 

 

Please help.

 

 

Thankx

Prakash


Viewing all articles
Browse latest Browse all 2823

Trending Articles



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