Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

cookie security - setting httponly and secure for XSRF-TOKEN in MVC/jquery core #11626


User avatar
0
pdehealth1 created

So I've tried various things to set this cookie to true for httponly and secure. This includes following the steps detailed at https://aspnetzero.com/blog/http-only-anti-forgery-token-in-asp.net-zero. When I try to implement this we get the following error: System.ArgumentException: An item with the same key has already been added. Key: X-XSRF-TOKEN

There are also a few other support posts about this issue, but none of them seem to provide a proper solution to this issue.

Please note that we are using the .Net Core MVC/Jquery framework. Let me know if you require any additional information.

Thank you.


1 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @pdehealth1,

    I couldn't reproduce the issue. Could you give me the steps for reproducing it?