I am using asp.net membership in my application and I have to reuse the session already created for that logged in user.
Means if an user logged into the application and open same application in new tab then user should be logged in autometically without re-enter user credentials.
So it means you must first store user logged in status inside session
So do it write after successful login, store user name and (possibly) user type in session, then
on Page_Loag event of every page in your application you must write something like:
if( Session["varUserName"].ToString() == null)
{
// redirect to Login page
}
else
{
// Welcome user by first checking user name and use type
}
Usman Waheed
Marked as answer by Angie xu - MSFT on Dec 20, 2012 04:55 AM
saurabh jain
Member
107 Points
85 Posts
How to reuse session.
Dec 13, 2012 03:49 AM|LINK
I am using asp.net membership in my application and I have to reuse the session already created for that logged in user.
Means if an user logged into the application and open same application in new tab then user should be logged in autometically without re-enter user credentials.
usman400
Contributor
3503 Points
721 Posts
Re: How to reuse session.
Dec 13, 2012 04:32 AM|LINK
So it means you must first store user logged in status inside session
So do it write after successful login, store user name and (possibly) user type in session, then
on Page_Loag event of every page in your application you must write something like:
if( Session["varUserName"].ToString() == null) { // redirect to Login page } else { // Welcome user by first checking user name and use type }