473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

asp application security

A little background first.. I'm working from home.. no real team to bounce
ideas off of, so you guys are it.

I'm working on an app SQL2k / ASP Classic, the quick and dirty is there is a
"worklist" of items for users to fix items so that the bill can be payed,
and there are also a series of reports. All items are grouped into 1 of 12
categories. Users are members of one of those 12 groups (categories).

A users worklist can be "filtered" by an admin based on location, bill
amount, first letter of payee's last name etc. Individual report access is
also limited based on user rights.

So.. how to maintain user security. A couple of ideas..

When a user logs in.. put a bunch of stuff into session variables that I can
then access as needed.

Second idea is to put just the logged in userID into a session variable, and
then call an SP or a function to check security as needed.

Third idea is to load up an array on login, stuff it on the session, call a
function on the page(s) as needed to check for appropriate rights

Last.. stuff some security info into a user specific Application var, and
call that as needed.. and then kill it on logout

Thanks for reading.. any thoughts on which may work better? Or a better
solution perhaps?

Thanks!
Jul 19 '05 #1
2 1425
The way I'd do it is to put the user's ID in a session variable when they log in. You may also want to assign an access level (eg 1 for system admin, ... 3 normal user, .... 5 read only), as a session variable also. You'd probably want to relate userIDs to categories if they are one-one. Then create a page or function that defines business/accesss rules for each user. This function can then be called each time a transaction is requested. Depending on the transaction requested, the userID, and user access level the function would return true or false. If true the transaction is performed. If false it is denied

Its often hard to get users to logout. However, the server session timeout (normally about 20 minutes) will end the session and clear the session variables automatically.

Hope this helps.
Jul 19 '05 #2
Perhaps have a login page that asks the user for his username and
password. And whatever page that posts to (which could be the same page
for a self posting form) tests these fields against what is in the
database, sets the username and userlevel session variables accordingly,
and then redirects to the proper page - i.e. back to the login page if
the password is wrong (perhaps with a JavaScript popup saying wrong
username/password combination) or to the main menu page if the password
is correct:

Session("UserName") = objRS("UserName")
Session("UserLevel") = objRS("UserLevel")
Response.Redirect "mainmenu.asp"

Then you can use If Then's or Select Case on each page to control
whether a user is allowed to actually be there and whether particular
links of where a user can go actually show up.

If (Session("UserLevel") <> "Admin") And (Session("UserLevel") <>
"Regular") Then
Response.Redirect "login.asp"
End If

Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: FrodoBaggins | last post by:
Dear Team, I am running Visual Studio 2003 Version 7.1.3088 on Windows Server 2003. I have written a C# application that must write to the event log. When it attempts to write to the event log,...
8
by: nickdu | last post by:
I'm trying to isolate "applications" into their own application domain within a single process. I've quoted applications because it's a logical representation of an application. Basically it...
1
by: Thorpe | last post by:
I have build a .Net (C#) winform application. The application opens and reads and writes to an xml file that is stored with the assembly. When I run the program on my local PC everything works....
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
3
by: Michael Glaesemann | last post by:
Hello all, Recently I've been thinking about different methods of managing users that log into a PostgreSQL-backed application. The users I'm thinking of are not necessarily DBAs: they're...
38
by: Oldie | last post by:
I have built an MS Access Application under MS Office XP (but I also own MS Office 2000). I have split the application in the pure database tables and all the queries, forms, reports and macro's. ...
5
by: isideveloper | last post by:
I'm building a new C# web application that will provide my company some administrative operations that were previously only completed by tweaking the data in the database. 1. Encrypted password...
5
by: Frank Rizzo | last post by:
I have a c# 2.0 winform app that runs under a user account with very limited rights. The application crashes on some actions (the Send Error to Microsoft screen) with unauthorized exception. ...
7
by: mxdevit | last post by:
Task: run application from ASP.NET for example, you have a button on ASP.NET page, when press this button - one application is invoked. the code to run application (for example, notepad) is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.