<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: CSRF token validation failed - ODATA in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaa-p/11795637#M4420153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are having a prroblem because you are not sending the csrf token correctly when pushing the data through the .net application.&lt;/P&gt;&lt;P&gt;Please take a look at the following posts:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://scn.sap.com/thread/3424154"&gt;https://scn.sap.com/thread/3424154&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Emanuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2016 19:07:44 GMT</pubDate>
    <dc:creator>former_member190010</dc:creator>
    <dc:date>2016-08-19T19:07:44Z</dc:date>
    <item>
      <title>CSRF token validation failed - ODATA</title>
      <link>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaq-p/11795636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i am fetching data&amp;nbsp; throw ODATA it's working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i am pushing data throw Gateway Client ( &lt;SPAN style="color: #000000; font-size: 12px;"&gt;/IWFND/GW_CLIENT) . it's also working fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is screen Shot of &lt;SPAN style="color: #000000; font-size: 12px;"&gt;/IWFND/GW_CLIENT tcode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px;"&gt;&lt;STRONG&gt;Below is CSRF Token.&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1019310" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is Status after data pushing.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1019311" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i am pushing data throw .NET application it's showing error "CSRF token validation failed"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below screen shot of .NET&amp;nbsp; Error.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1019339" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Below is C# (.NET) code for generating CSRF Token.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method 1 .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1019340" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method 2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1019358" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above code is generating &lt;STRONG&gt;CSRF Token&lt;/STRONG&gt; Successfully. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when pushing data throw .NET Application. it's throwing below error.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1019341" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying multiple scenario but it's not working properly. throwing error on " Client.SaveChanges()&amp;nbsp; " or " Client.UpdateObject() "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankx&lt;/P&gt;&lt;P&gt;Prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 13:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaq-p/11795636</guid>
      <dc:creator>p24time</dc:creator>
      <dc:date>2016-08-19T13:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: CSRF token validation failed - ODATA</title>
      <link>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaa-p/11795637#M4420153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are having a prroblem because you are not sending the csrf token correctly when pushing the data through the .net application.&lt;/P&gt;&lt;P&gt;Please take a look at the following posts:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://scn.sap.com/thread/3424154"&gt;https://scn.sap.com/thread/3424154&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Emanuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 19:07:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaa-p/11795637#M4420153</guid>
      <dc:creator>former_member190010</dc:creator>
      <dc:date>2016-08-19T19:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: CSRF token validation failed - ODATA</title>
      <link>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaa-p/11795638#M4420154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Emanuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thankx for your replay.. but i am trying many methad..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but .NET Genrated token not accepted by SAP...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVERY TIME THROWING SAME ERROR..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKX&lt;/P&gt;&lt;P&gt;PRAKASH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 20:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/csrf-token-validation-failed-odata/qaa-p/11795638#M4420154</guid>
      <dc:creator>p24time</dc:creator>
      <dc:date>2016-08-19T20:57:20Z</dc:date>
    </item>
  </channel>
</rss>

