Where should we manage session objects in an ASP.NET application?
Posted
by Kumar
on Stack Overflow
See other posts from Stack Overflow
or by Kumar
Published on 2010-05-25T19:19:18Z
Indexed on
2010/05/25
19:21 UTC
Read the original article
Hit count: 166
I am developing a 3-tired ASP.NET C# web application and was wondering where should the sessions be managed. I have a SessionManager class as follows:
public sealed class SessionManager
{
private const string USER = "User";
private SessionManager()
{
}
public static SessionManager Instance
{
get { return _instance; }
}
public User User
{
get { return HttpContext.Current.Session[USER] as User; }
set { HttpContext.Current.Session[USER] = value; }
}
}
Now should the session information be managed in the Business Logic Layer or should it be managed in the Presentation Layer?
© Stack Overflow or respective owner