Capture username from NT authenication login

  • snowdove
  • Newbie
  • Newbie
  • snowdove
  • Posts: 5

Post 3+ Months Ago

Can anyone help me out with how to capture the username (for further content control) when someone logs into an area on my website that is secure with NT Authenication?

Dawn Kennedy
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

i'm not an expert with NT nor with IIS, but it would seem to me that if
you're requiring a secure login to NT, that you would be able to tell who
is logging in from the logs...just an idea.
  • snowdove
  • Newbie
  • Newbie
  • snowdove
  • Posts: 5

Post 3+ Months Ago

Let me try to explain it better. I dont think I was clear.

Say there is a folder on my website that I want secure, so
I grant permissions only to the users I want to have access to it. That part of this is very common.

But now, when they login, I want to capture that username so I can use it for content control -- I can code the page so that what they see on that page will depend on who they are.

It has to be something like =SERVER[username] .... ???
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

oh i see...

well, in that case, I am really no help because it sounds like you need
some .asp coding. UNfortunately I have very little exposure to .asp in
my years of web design.

But, I'm sure someone will come across this and help point in the right
direction. Did you try googling this?
  • snowdove
  • Newbie
  • Newbie
  • snowdove
  • Posts: 5

Post 3+ Months Ago

That's ok, thanks so much for your help. I remembered. DUH Dawn.
For your reference, to grab the NT username for use in your pages secured with NT authentication it's:

Request.ServerVariables("LOGON_USER")

So if I wanted to say...write it to a variable to use for content control or anything else--to display on the page to say hello or WHATEVER.... it would be

<% WhoAmI = Request.ServerVariables("LOGON_USER") %>

Then use <% =WhoAmI %> however you want for your purpose. In my case, it will be checking a database to see what level in our company the person is for content contol.

Thanks much! I appreciate the effort very much.

Dawn Kennedy
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

well i'm glad you remembered! and thanks for posting the answer for
reference. You never know how many more people are going to come
here and ask this very question! That's what OZZU is all about.

and welcome to ozzu btw! ;)

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 106 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.