Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP Login

Posted on 1998-02-05
5
Medium Priority
?
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
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 is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

688 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