|
rdouglass -> RE: Authentication with AD (1/12/2005 14:17:44)
|
To present the user with a Username/Password/Domain login box, you need to turn on Windows Integration and turn Off anonymous access in the Directory Security section of the IIS Management software. When a user browses to any page in that directory, if they're not logged in as an authorized user it will present the Login box. To programmatically grab the AD name they're logged in under, use an ASP script like this: <% DIM UserName 'Grab login name MyVar=request.servervariables("logon_user") MyVar=MyVar & "" MyPos = InstrRev(MyVar, "/", -1, 1) UserName=Mid(MyVar,MyPos+1,Len(MyVar)) UserName=Right(UserName,(len(UserName)-instr(UserName,"\"))) %> Now you can use the user's logon name anywhere like this: <%=UserName%> That help any?
|
|
|
|