Hello,
am vinayak i want to know how to make secure web pages in asp.net am storing user name in session after login using that only am checking only if session is empty or not but how to avoid the problem when any one try to open the page he/she will get the page since the session will be there how to implement the secure page like in hotmail if you try to open the url from diff system it will not allow to open it will navigate to login page.
my main point :
1)how to avoid others to open my web pages when i am logged in or if am logged out.
2)how to make session empty when we will cancel the tab or close the browser.
thanks in advance

Vishal JadhavPosted Oct 18, 2014, 12:06 PM
Thanks.
vinayak ghantiPosted Oct 18, 2014, 8:35 AM
vinayak ghantiPosted Oct 18, 2014, 4:28 AM
vinayak ghantiPosted Oct 18, 2014, 4:27 AM
Riddhi ValechaPosted Oct 16, 2014, 4:24 AM
As far as I have understood, I can give you 1 solution.
1.Add a column in database.
2. Take all details of the user in the datatable and assign it to session variable.
3. Eg- Username, Password, Level, Reporter - Are your columns.
Now, for this user, say the level is "Member".
THen check if(dr["Level"].TOString() == "Member")
{
//Hide all menus that the user should not view.
}
4.This will also work if necessary links are called from database.
Hope this helps.
Vishal JadhavPosted Oct 16, 2014, 3:48 AM
Here are your answers:
1. There are two different solutions for two different scenarios i.e. when you are logged in and when you are logged off
-You need to save all user's access permissions. to restrict them from viewing your pages i.e. only authorized user can only be able see that page no matter whether you are logged in or logged off.
-When you are logged in to the system, you need to maintain the session to avoid others to access your session.
2. Whenever you close the browser session will automatically get emptied.