Solved

Password protected web page

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Angular won't showing my array result in HTML 3 54
CSS Style Effect 2 18
Asp response.write to clients 6 32
How to get chosen background-color on every line? 10 14
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

679 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