Solved

Password protected web page

Posted on 2008-10-16
3
152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bootstrap input box width 2 33
Retrieve values of an HTML form using JQUERY 2 38
Wrapper for APPs 9 31
insert text field data into html script 13 22
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

16 Experts available now in Live!

Get 1:1 Help Now