Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP Login

Posted on 1998-02-05
5
Medium Priority
?
188 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 60 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

963 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