navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

RE: NT authentication

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> RE: NT authentication
Page: <<   < prev  1 [2]
 
rdouglass

 

Posts: 9270
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.

(in reply to alexp)
BeTheBall

 

Posts: 6362
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.

(in reply to rdouglass)
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

(in reply to BeTheBall)
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)

(in reply to alexp)
Page:   <<   < prev  1 [2]

All Forums >> Web Development >> ASP and Database >> RE: NT authentication
Page: <<   < prev  1 [2]
Jump to: 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