Solved

ASP Login

Posted on 1998-02-05
5
161 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to dynamically set the form action using jQuery.

706 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

19 Experts available now in Live!

Get 1:1 Help Now