-
Notifications
You must be signed in to change notification settings - Fork 66
System.Web.HttpContext.Session is null with SystemWebAdapters v1.3.0 on .Net 8 after upgrading the 1.20 version on .Net 6. #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for logging this @sgarnovsky, it looks like this is a dupe of #453 ? |
Yes, originally I thought it was the same, but now I'm not sure. |
Hello, i tried an example but seems .net8 and yarp 1.3 is not working together or there is a bug in VS2022. i always get the session values null in asp.net core app. but downgrading to all packages of system web adaptors to 1.2 works seamlessly. please advise what could be the issue. please find the repos links with ver 1.3 https://github.com/erpardeepkaushik/TestWebCore |
@erpardeepkaushik in my case if i use protected void Session_Start(Object sender, EventArgs e)
|
Upgrading from the 1.2.0 to 1.4.0 doesn't show this issue anymore. I guess it was fixed with 1.3.1 version. |
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.
The text was updated successfully, but these errors were encountered: