我已将网站从Win2003 x32移动到Win2008R2 x64。它在旧服务器上运行良好。该网站使用活动目录进行身份验证。我在2008年收到此错误:-2147023584:指定的登录会话不存在。它可能已经被终止了。我尝试过切换到经典模式等,没有任何变化。它确实执行VBScript代码(否则我不会得到错误)。
以下是代码:
Function AuthenticateUser(UserName, Password)
On Error Resume Next
Dim oADsNamespace, oADsObject
Dim strADsNamespace, strADsPath
strADsPath = "WinNT://ibcschools.edu"
strADsNamespace = left(strADsPath, instr(strADsPath, ":"))
Set oADsObject = GetObject(strADsPath)
Set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, UserName, Password, 0)
Response.Write(Err.Number & " : " & Err.Description & "<br />")
If Err.Number = 0 Then
Set oADsNamespace = Nothing
Set oADsObject = Nothing
Set strADsNamespace = Nothing
Set strADsPath = Nothing
AuthenticateUser = True
Else
Set oADsNamespace = Nothing
Set oADsObject = Nothing
Set strADsNamespace = Nothing
Set strADsPath = Nothing
AuthenticateUser = False
End If
End Function
任何帮助将不胜感激。感谢。
答案 0 :(得分:0)
您的问题似乎与using WinNT provider with OpenDSObject有关。
你可以尝试的事情:
WinNT
替换为LDAP
提供商。答案 1 :(得分:0)
好的,我开始工作了。在没有域名的情况下工作之前,但现在需要它。我认为它与旧服务器上登录的应用程序池相比,与此相关。我将继续努力。我不想改变所有网站。