Solved

I need to be able to have a user login and be redirected to different index pages based on their ID's

Posted on 2008-10-13
2
145 Views
Last Modified: 2013-11-07
I have a login.aspx page developed. I need to figure out how to tie this to an Access 2003 database that stores the user id and passwords. If the id and pass are correct then redirect the user to a file location and index.aspx page. I am not sure if I need to have the folder and page file in the database or in the code behind. Any ideas and sample code you can provide me would be greatly appreciated. Here is the file structure I am using. In the () is the user id that I will need in the database to access this directory. Thanks for your time. And I don't want to use the membership tables if at all possible.

client folder
login.aspx
----- c1 folder (id_00001)
----- index.aspx

----- c2 folder (id_00002)
----- index.aspx
0
Comment
Question by:woodje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
pwrBall earned 500 total points
ID: 22707037
It sounds like you need to create user roles for your site.  

You should have a table that contains user roles, and assign each user a specific role like 'admin' and 'user'

UserRole table:
userRoleID         userRoleName
1                        admin
2                        user
3                        poweruser


So you'd have to create a user role table in access and a new column in the user table for the role ID.

Based off of the role ID, that you should check during login, you would send the user to a specific hard coded directory.

This helps to:
http://www.codeproject.com/KB/aspnet/custom_authentication.aspx

The above link does not include accessing a database though.

I created a Login class which I call from the login page code behind to connect to the database with the passed in credentials that the user types in.  Only difference is that I used SQL Server 2000.
Based off of the users' role, I passed them to a different folder that they had access to.


0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 22711030
Explore the ASP.NET Routing and Dynamic Data. I thinks that has the answer to your question.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 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