Login and password dialog

I want to use dialog for login and password in asp.How i can do it.
malik_mumtazAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xabiCommented:
Hi there:

You must create an login page with a form where you must ask for the login an the password:

..
..
<form name="myform" action="login2.asp" method="post">
Login:<input type="text" name="login">
<br>
Pass:<input type="password" name="password">
</form>
..
..


Then you must create a page "login2.asp" where you must get the values submitted from the previous page this way:

..
..
<%
login=request.form("login")
password=request.form("password")
%>
..
..

now you have the values of the login and password and you must check is this values are correct (using a database query or simply checking this values with a predefined values. If the values passwed are oke then make something like this:

..
..
if login="my_user" and password="my_password" then
  session("user_logged")="ok"
  response.redirect("first_page.asp")
else
  session("user_logged")="no"
  response.redirect("error.asp")
end
..
..

This will redirect to the right page depending on the correct values. In every page you must first chec if the user is logged this way:

..
..
is session("user_logged")<>"ok" then
  response.redirect("login.asp")
end if
..
..

If you have any problem just ask

xabi
0
malik_mumtazAuthor Commented:
Sorry I have used this technique but
I want to call browser authentication dialog.
0
robbertCommented:
Under Windows NT, in Windows Explorer, right-click at the file or directory you want to protect. Select Security, Permissions. Delete User "Everyone", and select the user you want to allow access. Give him the right to "read" or whatever is useful.

Before, possibly create that user in the User Manager.

Under Unix, there is a .htaccess file, but I don't know what to do there.

- But I assume, your site is hosted by an external provider. So tell them which directory to protect, and which name and password to use. If you're paying enough money, he will follow your command ;-)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

jamestthomasCommented:
Set your website security to windows NT challenge and response.  That will open a dialog box for login when someone attempts to access your site.  Put the users you want to have access to the site in a local group which has permissions to access the site (in user manager for domains).  When the challenge and response diaplog box appears, the user will have to add an ID and password for a user you have specifically put in that group or else they will not be allowed in the site.  Further help is available on the microsoft site, look up IIS security and challenge and response.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
malik_mumtazAuthor Commented:
I have a database.Where user are added
by registration online.I want to call win NT security dialog through asp pages.It is possible or not.
0
jamestthomasCommented:
Those people can register on line but they still must be placed into the group allowed access to the site in order for my answer to be applicable.
If you are talking registering and immediate access, you will want to use Microsoft Site Server.  That product is designed for allowing registered users into a particular site.
0
malik_mumtazAuthor Commented:
Please explain about site server.
0
jamestthomasCommented:
Microsoft Site Server is a large E commerce product produced to help companies offer sites that allow for registration of users online.  It also granulates user levels of authority so that users can opt for certain levels of membership and this level is enforced within the site.  It essentially works with SQL server which is not recommended to be installed on the same machine as the server.  Microsoft will have alot of literature online about it so I would recommend going their and doing research.  It is a complicated product but very powerful.  If you are in need of what it offers, it can be great.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.