That’s a good call. I can’t share the project, but I decided to create a minimum reproduction project to share with you instead. When I did this, it worked fine! So I did a quick compare and figured out the problem:
ASPNET Core MVC template by default includes this in Startup.cs -> ConfigureServices:
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});
And this in Startup.cs -> Configure:
app.UseCookiePolicy();
I had removed the part from ConfigureServices but not from Configure. I tested it, and I need to have both removed or both included, otherwise I will get the correlation error. Thank you for helping me solve this!