Add-in development: New session id on every request

I'm using ASP.NET Core and AJAX calls to try to create a simple add-in based off one of the examples in the developer portal. I've done everything I need to on the configuration of my project to ensure I get the same session id. When I test my code outside the host page everything works fine and I can read from and write to session with no problem. Once I try to run in the sandbox I'm getting a new session on every single request.

It feels like I'm missing something simple but I haven't been able to figure it out. Can anyone point me in the right direction for a solution?


Thanks!

Comments

  • I figured it out. Just as an FYI for anyone who may experience this in the future. Setting the SecurePolicy of the cookie to "SameAsRequest" it mitigated the issue.

Categories