Skip to Content

CSRF token validation failed - ODATA

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.



HTTPReq.PNG (4.7 kB)
HTTPRes.PNG (13.0 kB)
HTTP Error.PNG (7.8 kB)
CSRF Token.PNG (19.8 kB)
HTTP Error.PNG (7.8 kB)
CRSF Token 2.PNG (21.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 19, 2016 at 07:07 PM

    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:

    Best Regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.