07-22-2023, 11:56 PM
I see two means of working with session data in ASP.NET MVC:
* `System.Web.SessionState.HttpSessionState`, available on `HttpApplication`
* `System.Web.HttpSessionStateBase`, available on `Controller`
Data stored in one seems to be available in the other.
Unfortunately the only common ancestor of these two types is `System.Object`, meaning that I can't create reusable utility code for the abstraction of either.
Why is the API this way? Is there an important difference between the two that I am missing?
* `System.Web.SessionState.HttpSessionState`, available on `HttpApplication`
* `System.Web.HttpSessionStateBase`, available on `Controller`
Data stored in one seems to be available in the other.
Unfortunately the only common ancestor of these two types is `System.Object`, meaning that I can't create reusable utility code for the abstraction of either.
Why is the API this way? Is there an important difference between the two that I am missing?