|
| |
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: NT authentication - 10/7/2004 13:04:07
I personally don't know how to do that. I always rely on the standard login box. Anyone else? Have you checked: http://www.4guysfromrolla.com
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
BeTheBall
Posts: 6487 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: NT authentication - 10/9/2004 10:43:34
quote:
ORIGINAL: rdouglass Just my $.02 - I use it dynamically like this: <% MyVar=request.servervariables("logon_user") MyVar=MyVar & "" MyPos = InstrRev(MyVar, "/", -1, 1) UserName=Mid(MyVar,MyPos+1,Len(MyVar)) %> That works with any domain at any length. quote:
Just my $.02 - I use it dynamically like this: <% MyVar=request.servervariables("logon_user") MyVar=MyVar & "" MyPos = InstrRev(MyVar, "/", -1, 1) UserName=Mid(MyVar,MyPos+1,Len(MyVar)) %> That works with any domain at any length. Here's another method that should work just as well: <% varLogonUser = Split(request.servervariables("logon_user"),"\") UserName = varLogonUser(1) %>
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
skrile
Posts: 59 Joined: 1/28/2002 From: Novi MI USA Status: offline
|
RE: NT authentication - 10/11/2004 13:41:27
I've actually had some problems parsing the logon_user variable for one simple reason, windows will allow you to use either slash ("/" OR "\") when logging in! No, really, try it. Anyway, here's how I've done it:
DIM GetLogonUser, MyPos
GetLogonUser = Request.ServerVariables("LOGON_USER")
If InStr(GetLogonUser,"\") > 0 then
GetLogonUser = Replace(GetLogonUser,"\","/")
End If
MyPos = InstrRev(GetLogonUser,"/",-1,1)
GetLogonUser = Mid(GetLogonUser,MyPos+1,Len(GetLogonUser))
Seems crazy to have to look at slash direction, but I got too many calls from frustrated users to ignore Also, might I suggest you store the entire Logon_user variable in the database. May seem like extraneous information now, but what about when your company aquires another and there are 14 ssmith's?
_____________________________
Steve Krile Ergonomist posing as web developer - or visa versa
|
|
|
|
rg20
Posts: 10 Joined: 10/15/2004 Status: offline
|
RE: NT authentication - 10/15/2004 16:21:57
The other method is to do this <% DIM UserName MyVar=request.servervariables("logon_user") myVar = split(myVar,"\") session("username") = myVar(1) %> The domain is myvar(0) the username is myvar(1)
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|