toraj58
December 30th, 2008, 04:36 AM
i need to have seperate Session objects in my site;
becuase when i use Session.Abandon();
i don't want to destroy all of them.
for example i use a session to check the user that logged in admin area.
and another session to check user logged in members ares.
like this:
Session["loggedAdminArea"] = true;
//somewere else in the code...
Session["loggedMemberArea"] = true;
//somewere else in the code...
Session.Abandon();
but when i uses Session.Abandon(); both of them destroy.
in the cases when admin (in one system) both loggin in the admin area and loggin in the members area it causes a logg off in both after calling Abandon method.
how shoud i use Abondon method to destroy particular sessions or should i change my approach completely?
becuase when i use Session.Abandon();
i don't want to destroy all of them.
for example i use a session to check the user that logged in admin area.
and another session to check user logged in members ares.
like this:
Session["loggedAdminArea"] = true;
//somewere else in the code...
Session["loggedMemberArea"] = true;
//somewere else in the code...
Session.Abandon();
but when i uses Session.Abandon(); both of them destroy.
in the cases when admin (in one system) both loggin in the admin area and loggin in the members area it causes a logg off in both after calling Abandon method.
how shoud i use Abondon method to destroy particular sessions or should i change my approach completely?