Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Password protected web page

Posted on 2008-10-16
3
Medium Priority
?
160 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 750 total points
ID: 22729917
0
 
LVL 2

Assisted Solution

by:EruditeMonkey
EruditeMonkey earned 750 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

877 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