Hi,
I want all the logged in users to access my site and those not logged in to be directed to login page.
What all should i do in global.asax and web.config file?
You will need to create a Session variable
Session["UserId"] and check if this variable is null in all pages if yes redirect to login page
After successful login set the UserId of the user in session variable
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.