[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

validate NT Logon name using ASP and XP

Posted on 2004-04-16
5
Medium Priority
?
419 Views
Last Modified: 2012-06-27
I am using XP and have created an ASP Login page on my site.  At present the user has to type in a user name and password to access the site.

What I would like to do is automatically check the users NT logon name when the page opens.  If the user exists(ie, they are an NT user and they have a relevant row in the associated lookup table within my database), then allow them access.

I have searched various other sites including this one and cannot find the answer.

Any help appreciated
0
Comment
Question by:fx124
[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
5 Comments
 
LVL 7

Expert Comment

by:ramesh12
ID: 10843505
0
 

Author Comment

by:fx124
ID: 10843800
thanks for that ramesh12.

Unfortunately it is not quite what I am looking for.  Maybe my description wasn't clear enough.  I know I can hard-code in the Userdomain and username but that is what I am trying to get away from.  I want the "Application" to pick these up automatically from the machine i am logged in to

Thanks
0
 
LVL 7

Expert Comment

by:TheKenman
ID: 10843973
For the domain, you can use this ADSI example:

     ' Get Domain name from RootDSE object.
     Set objRootDSE = GetObject("LDAP://RootDSE")
     strDomain = objRootDSE.Get("DefaultNamingContext")
     Set objRootDSE = Nothing

For the user, do this:

     strUser = Request.ServerVariables("LOGON_NAME")
     strPW = Request.ServerVariables("AUTH_PASSWORD")

But I think that only works once you've logged in...
0
 

Author Comment

by:fx124
ID: 10844215
Thanks TheKenman

I shall have to get back to you on Monday with the result.  Fingers crossed, eh!
0
 
LVL 5

Accepted Solution

by:
MMeijer earned 1500 total points
ID: 10846705
By default the Request.ServerVariables("LOGON_NAME") = empty, unless "allow anonymous access" is off (IIS manager>permissions).

Normally this would result in a authentication box when a user is trying to access the site.
Unless this is about an intranet and users use IE then IE will try to automatically authenticate by sending the current user logon info, for more info on this open IE>Tools>Internet Options>Security.

Once you get the Request.ServerVariables("LOGON_NAME") it exists of domain/username, now you can test the info with ADSI.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

649 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