Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 14th, 2003, 08:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting Windows User and IP information in ASP

Hi People, how are we today?

I'm finding it difficult finding any resources regarding my question. Here's what I want ot do exactly.

I have a website that's run on an intranet, the site requires a username and password.

What I would like to do is save the users having to log on twice for both the NT/2K Network and the website.

I'd like, using ASP, to capture that users User login and IP address and use these to validate the user.

I imagine using an access DB along the way which holds usernames and passwords for teh site would be used to cross check the user login and ip address.

Can anyone guide me here?

Cheers,

Blaise.
 
Old August 15th, 2003, 03:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you turn off anonymous acces to your site (or just that page) then the browser will send the user credentials to the server without the user having to do anything. You can get the domain\username through Request.ServerVariables("LOGON_USER"). The client's IP address is available in Request.ServerVariables("REMOTE_ADDR").

You don't say exactly why you need this info. Do you just want to restrict access to certain users? If so, one way would be to create a new NT Group of the users allowed access. You can use the domain\username to to check if the user is a member of that NT Group via ADSI (see http://www.15seconds.com/issue/020130.htm for examples). You should try to avoid having a separate user db for you site if possible. In an intranet scenario you should be able to handle things like this using just windows.

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
IP address of the user. 99mary BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 March 26th, 2007 09:23 AM
Windows Services and Remote IP capturing Coder1110 C# 0 July 14th, 2006 04:27 AM
How to create a new windows user in ASP.NET iteamicp2p General .NET 2 October 6th, 2004 07:37 AM
ASP.NEt, creating new user on Windows 2000 Domain sstoutkc Classic ASP Components 2 April 29th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.