Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How we use session management in login page mvc5 aspdotnet


What I have tried:

How we use session management in login page mvc5 aspdotnet
Posted
Updated 13-Feb-18 5:35am
Comments
F-ES Sitecore 13-Feb-18 10:34am    
You'll need to elaborate, do you have a problem using the session, or are you looking to hold the current user in the session?

1 solution

You can always get the logged in user by using User.Identity.GetUserId(). If the string comes back null or empty, the current user is not "logged in". If you simply need to know if the user is currently logged in, use User.Identity.IsAuthenticated.

BTW, your question kinda sucks due to an almost complete lack of detail.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900