0

I'm trying to add a token to a razor view which is being sent through an HTTP header (I'm following the docs). Unfortunately, the default expiration timeout is different from the login session (120 mins vs 20, if I'm not mistaken).

So, is there a way to change the expiration time of the token? The options passed to the AAddAntiforgery method will let me setup the cookie lifetime, but what about the token? Do I need to change the session timeout?

Thanks

Luis Abreu
  • 4,008
  • 9
  • 34
  • 63

1 Answers1

0

After some digging, I've found the answer on the official MS docs. Besides settting the Load User Profile option to true, it's also required to make sure that the setProfileEnvironment is enabled (by default, it was set to false in the app pool default template on my Windows 10 dev machine).

Luis Abreu
  • 4,008
  • 9
  • 34
  • 63