Solved

ASP Login

Posted on 1998-02-05
5
165 Views
Last Modified: 2013-12-25
How can I create a way to have my users login?  I'd like to have it where when they first access anypage of mine, a login dialog box pops up.  How would I go about doing this?  And I'd obviously need to keep track of their login id, so when they make comments or submit input, the person's id who's bmitting the input can be recorded.  Thanks!  Sorry for the low points, they're all I've got!
0
Comment
Question by:mitchell042997
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
warlords earned 30 total points
ID: 1857112
You need to make a Session Variable in the Global.asa file.  Inside a file, put a Session("User_ID") in to area of Session_OnStart.  Then, this variable will be assigned a value when user login and clear when they leave your virtual root.
0
 
LVL 2

Author Comment

by:mitchell042997
ID: 1857113
In each homepage after the login page, you may check the Session("User_ID") variable.  If this variable is equal to null.  Then, redirect the user to the login pages.

<% If Session("User_ID") = "" Then
      Response.Redirect("redirect.asp")
   End If
%>
0
 

Expert Comment

by:warlords
ID: 1857114
OK, but how do I get a login dialog box to pop up?  That's the effect I am aiming for.
0
 
LVL 2

Author Comment

by:mitchell042997
ID: 1857115
You may use VBScripts to send a input box to a user for input their information.  then save it in the session("User_ID") variable.  It will then ok !
:)
0
 

Expert Comment

by:warlords
ID: 1857116
I've got a much better solution: HTACCESS
you can check it out here: http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html
basically, you creat a file called .htaccess
in the directory of the webpage, and the server automatically requires a password to access all file in the directory.
also, you can have a username and passwd file called .htpasswd
and use environment variables to find username, i think it's in CGi HTTP_AUTH_USER environment var contains the username, any way  check it out, it's great if your server uses ncsa httpd
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video teaches users how to migrate an existing Wordpress website to a new domain.

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now