You're definitely looking to set a Request cookie, this much i know.
-I'm still dipping the toes into dotnet-core myself; i haven't had the need to do this task yet so can't share direct experience but the following article appears to be on-point for setting the Request cookie:
https://www.c-sharpcorner.com/article/asp-net-core-working-with-cookie/
--
This is also something new to me, not likely related, but a good to know to file away in the brain for later days should it (inevitably?) become relevant: https://stackoverflow.com/a/52461278/2150286
Create cookie in surface controller
Hi, I'm trying to create a cookie in a surface controller with following code:
When the page reloads, and I read my cookie it is not set. But when I reload the page again. The cookie exists and has the correct value.
What could be the issue here?
In our v8 .NET code I remember setting both Request and Response cookies like this:
But .NET core only allows setting Response cookies.
Thanks for any advice!
Howdy friend,
You're definitely looking to set a Request cookie, this much i know. -I'm still dipping the toes into dotnet-core myself; i haven't had the need to do this task yet so can't share direct experience but the following article appears to be on-point for setting the Request cookie: https://www.c-sharpcorner.com/article/asp-net-core-working-with-cookie/
--
This is also something new to me, not likely related, but a good to know to file away in the brain for later days should it (inevitably?) become relevant: https://stackoverflow.com/a/52461278/2150286
The cookie setting code was not the problem.
I updated
to
This fixed the issue.
is working on a reply...