ASP.NET newbie here. Is it an OK practice to use the HttpContext.Current.Session object to test user access? I have created a session management object that will handle the database end of session authentication. I want to write a function something like the following:
public static Boolean am_i_logged_in()
{
if (HttpContext.Current.Session["session_key"] == null)
{
return false;
}
else
{
// Check database for user's session key.
// If session key is valid, return true. Otherwise, return false.
}
}
Also, I am new to this group. If this mailing list is for announcements only, and is not for these sorts of questions, please forgive the rookie mistake.
Thanks,
-Neil