cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CSRF token validation failed - ODATA

p24time
Explorer
0 Likes
6,899

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.

Below is Status after data pushing.

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

Below screen shot of .NET  Error.

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

Method 1 .

Method 2.

above code is generating CSRF Token Successfully.

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

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

Please help.

Thankx

Prakash

Accepted Solutions (1)

Accepted Solutions (1)

former_member190010
Contributor
0 Likes

Hi Prakash,

You are having a prroblem because you are not sending the csrf token correctly when pushing the data through the .net application.

Please take a look at the following posts:

https://scn.sap.com/thread/3424154

Best Regards,

Emanuel

p24time
Explorer
0 Likes

HI Emanuel,

thankx for your replay.. but i am trying many methad..

but .NET Genrated token not accepted by SAP...

EVERY TIME THROWING SAME ERROR..

THANKX

PRAKASH

Answers (0)