Author |
Topic |
|
kkanarsk
Starting Member
5 Posts |
Posted - 25 July 2001 : 16:09:41
|
When I enable Auto NT Authentication I get the following error: Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'strNTUserInfo.FullName'
/forums/inc_functions.asp, line 1272
Im am running Windows 2000 Server/IIS 5. Has anyone else run into this?
I can disable NT Auto Authentication but leave authentication type set to NT and it works if I manually enter the user ID in the database.
TIA, -Kevin
Edited by - kkanarsk on 30 July 2001 16:32:16 |
|
kkanarsk
Starting Member
5 Posts |
Posted - 30 July 2001 : 16:47:11
|
I can't believe nobody else has run into this. No matter what I do to try and enable NT Auto Logon I get the above error. Is there some documentation that outlines exactly what to do?
|
|
|
mclek
New Member
Australia
50 Posts |
|
kkanarsk
Starting Member
5 Posts |
|
kkanarsk
Starting Member
5 Posts |
Posted - 02 August 2001 : 10:12:23
|
I finally got this working in my environment and just wanted to post the fix since it looks like a bug in the inc_functions.asp file. The problem lies in the NTAuthenticate subroutine.
The server variable AUTH_USER doesn't return the domain name, just the NT User ID and GetObject("WINNT://"+strNTUser) requires a domain name. Once I hard coded our domain name in here it worked. I don't know why I had to do this and no one esle had to but that is the only way it will work for me.
My environemnt: Snitz Forums 3.3.02 Windows 2000 Server/Active Directory/IIS 5.0 (It also didn't work when the server was in a workgroup}
|
|
|
Greg Bowman
Starting Member
USA
30 Posts |
Posted - 02 August 2001 : 22:43:02
|
Kevin
could you copy/paste the section of code you changed (I am curious)? I too still have problems with some users, but not with others. Your post is making me suspect that I have a domain problem with my code (there are 4 domains here, yuk).
One hack (if interested) is to insert "on error resume next" just before the domain lookup occurs in inc_functions.asp. The user can logon albeit with an account name (gbowman) but blank "" full name (Greg Bowman); which I have to manually enter later.
if strAutoLogon="1" then on error resume next strNTUserFullName = Session(strCookieURL & "strNTUserFullName") if Session(strCookieURL & "strNTUserFullName") = "" then Set strNTUserInfo = GetObject("WinNT://"+strNTUser) strNTUserFullName=strNTUserInfo.FullName Session(strCookieURL & "strNTUserFullName") = strNTUserFullName end if end if
Greg.
|
|
|
TerryG
Junior Member
United Kingdom
179 Posts |
Posted - 03 August 2001 : 03:40:42
|
Some one called cal Korp once pointed me to this bit of code in these forums (for v3.1 SR4) which gets it working with multiple domains.Replace the following section of code in INC_FUNCTIONS.ASP:
sub NTAuthenticate() dim strUser, strNTUser, checkNT strNTUser = Request.ServerVariables("AUTH_USER") strNTUser = replace(strNTUser, "\", "/") if Session(strCookieURL & "userid") = "" then strUser = Mid(strNTUser,(instr(1,strNTUser,"/")+1),len(strNTUser)) Session(strCookieURL & "userid") = strUser end if if strNTGroups="1" then strNTGroupsSTR = Session(strCookieURL & "strNTGroupsSTR") if Session(strCookieURL & "strNTGroupsSTR") = "" then Set strNTUserInfo = GetObject("WinNT://"+strNTUser) For Each strNTUserInfoGroup in strNTUserInfo.Groups strNTGroupsSTR=strNTGroupsSTR+", "+strNTUserInfoGroup.name NEXT Session(strCookieURL & "strNTGroupsSTR") = strNTGroupsSTR end if end if
if strAutoLogon="1" then strNTUserFullName = Session(strCookieURL & "strNTUserFullName") if Session(strCookieURL & "strNTUserFullName") = "" then Set strNTUserInfo = GetObject("WinNT://"+strNTUser) strNTUserFullName=strNTUserInfo.FullName Session(strCookieURL & "strNTUserFullName") = strNTUserFullName end if end if end sub
with the following:
sub NTAuthenticate() dim strUser, strNTUser, checkNT strNTUser = Request.ServerVariables("AUTH_USER") strNTUser2 = replace(strNTUser, "\", "/") if Session(strCookieURL & "userid") = "" then strUser = strNTUser Session(strCookieURL & "userid") = strUser end if if strNTGroups="1" then strNTGroupsSTR = Session(strCookieURL & "strNTGroupsSTR") if Session(strCookieURL & "strNTGroupsSTR") = "" then Set strNTUserInfo = GetObject("WinNT://"+strNTUser2) For Each strNTUserInfoGroup in strNTUserInfo.Groups strNTGroupsSTR=strNTGroupsSTR+", "+strNTUserInfoGroup.name NEXT Session(strCookieURL & "strNTGroupsSTR") = strNTGroupsSTR end if end if
if strAutoLogon="1" then strNTUserFullName = Session(strCookieURL & "strNTUserFullName") if Session(strCookieURL & "strNTUserFullName") = "" then Set strNTUserInfo = GetObject("WinNT://"+strNTUser2) strNTUserFullName=strNTUserInfo.FullName Session(strCookieURL & "strNTUserFullName") = strNTUserFullName end if end if end sub
|
|
|
Kal Corp
Average Member
USA
878 Posts |
Posted - 08 August 2001 : 20:39:39
|
I have 3.3 and dont see a problem with NT ?
I will check my code too
|
|
|
kkanarsk
Starting Member
5 Posts |
Posted - 09 August 2001 : 12:36:00
|
I modified the code to display what strNTUser and strNTUser2 were returning and they both had just the NT User ID, no domain name. From looking at the ADSI documentation the "WinNT://" object should contain the domain name first then the NT User ID.
I don't know why my AUTH_USER server variable doesn't return the domain name. Maybe it is because we don't type in a domain name when loging in. It just uses the default domain.
-Kevin
|
|
|
|
Topic |
|