Description
Originally I'd already created a project using .Net 6 and SystemWebAdapters using version 1.2.0 and it worked fine.
After migrating to the .Net 8 and SystemWebAdapters 1.3.0 (nuget package) Session from the System.Web.HttpContext is returned as a null reference.
Initialization code is:
services.AddSystemWebAdapters()
.AddSessionSerializer()
.AddMssAdminSessionSerializer()
.AddRemoteAppClient(options =>
{
options.RemoteAppUrl = new(Configuration.GetMigrationLegacyAppAddress());
options.ApiKey = Configuration.GetMigrationRemoteAPIKey();
})
.AddSessionClient();
app.MapRazorPages()
.RequireSystemWebAdapterSession();
One thing I see that this github project refers 1.2.0 version only. It is possible the 1.3.0 has changed initialization steps or maybe just moved the source to another place?
So for now, I just downgraded the SystemWebAdapters packages back to 1.2.0 version. Confirmed the Session sharing works fine under .Net 8 in this case.