Solved

Password protected web page

Posted on 2008-10-16
3
151 Views
Last Modified: 2010-04-21
i m developing a web site with members login. in my default page their is a login and password , after entering username and password the user can access the page which is redirect according to username and password, now suppose if any user make that redirected page as home page or bookmark that page than he can able to skip that login/default page. I want the script in asp.net that the user can only access that redirect page through correct login and password and can't able to open that page directly by skiping default page.
0
Comment
Question by:cbpandya
3 Comments
 
LVL 4

Accepted Solution

by:
sijishJohn earned 250 total points
ID: 22729917
0
 
LVL 2

Assisted Solution

by:EruditeMonkey
EruditeMonkey earned 250 total points
ID: 22730175
The forms authentication mentioned above is the best solution but if you want something quick and simple you could try this:
On the login page, once the password has been checked add a session variable:
Session("LoggedOn")=True
Then, on each of the pages you want to secure add this in page_load

If Session("LoggedOn") Is Nothing Then Response.Redirect("Default.aspx")
 
0
 

Author Closing Comment

by:cbpandya
ID: 31506678
Can you explain me

"Session("LoggedOn")=True

Then, on each of the pages you want to secure add this in page_load


If Session("LoggedOn") Is Nothing Then Response.Redirect("Default.aspx")

because i have around 11 - 15 fixed different users for my web site to access their particular pages for all 11 - 15 users, can you tell me how i can set each session for each users and how ?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now