I’m looking into how to get session working across a .NET Framework and a .NET 8 application. I was able to get it working with remote session but I also saw there’s a Wrapped session state as well: https://learn.microsoft.com/en-us/aspnet/core/migration/inc/wrapped?view=aspnetcore-8.0
It says you don’t have to add anything to the .NET Framework application and to just add this to the .NET 8 app:
builder.Services.AddSystemWebAdapters()
.AddJsonSessionSerializer(options =>
{
// Serialization/deserialization requires each session key to be registered to a type
options.RegisterKey<int>("test-value");
options.RegisterKey<SessionDemoModel>("SampleSessionItem");
})
.WrapAspNetCoreSession();
After doing this I’m unable to pass anything from app to app, it’s always null. Does anyone have any more guidance on how wrapped session works, I can’t find anything online other than the above snippet. Not even an explanation really.