Best approach for authenticating users for various departments in ASP.Net

L

Larry Rekow

I created a web application in classic ASP 6 months ago that had a
login page which would only allow certain users to add, update or
delete files from 6 different departments. (Windows 2000 server, NTFS,
IIS5, not using Active Directory. After users are challenged for basic
windows authentication, they get to the login page.)

At the time, I set-up an Access db and a manager's page to add, delete
and modify the permissions of users. When a user would login, a string
would be put into their session variable showing which departments
they had permission to use. the string was something like: 0010100
where the first "0" meant they didn't have permission to department 1,
but, in this case, they DID have permission to departments 3 and 5.
They have 6 departments...the seventh digit was to show they had
permission to all departments.

Anyhow, at the top of each department page where a user could do any
adding or deleting or updating, i put an include file that would
redirect them to the login page if they didn't have the correct string
for that department in their session variable.

Works fine (tho some don't like having to login again after the
session times out), but I'm now wanting to re-write this app in
ASP.Net, and would like to find a more elegant approach to this. New
to ASP.Net; not looking for code, just some direction for a better
solution. Any ideas appreciated.

Thanks,

Larry Rekow
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
H

Hermit Dave

well you could use windows authentication to do user authentication.
or you could do forms authentication.

either way create groups and add users to different groups.
in web.config you can specify which group has access to what resource..
individual or directory using location element.

http://authors.aspalliance.com/aspxtreme/webapps/aspnetauthentication.aspx

http://www.codeproject.com/aspnet/custom_authentication.asp

just google it up if you need any more examples

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top