Session in .NET 8

Simple question,

What is the DotVVM equivalent of the WebForms ASP.NET Session, for .NET 8?

We need to store user specific info/data, regardless of what page the user visits.

DotVVM does not have session, since you can use the Asp.Net Core session implementation: Session in ASP.NET Core | Microsoft Learn

Thank you, I’ll study that.

I was hoping for a nullable shortcut in DotVVM.Framework.Hosting.IHttpContext:


It would have made a lot of sense to be found under User.

Yea, but session works a bit differently on .NET Core and .NET Framework (it might not even be registered on .NET Core), so we can’t simply unify the interface. You can access the session using context.GetAspNetCoreContext().Session, I don’t think it’s that longer.

1 Like

OOooo, did not know of this shortcut. Awesome!!