经典ASP(VBScript)的,2008 R2,使用AD进行身份验证错误 [英] Classic ASP (VBScript), 2008 R2, error using AD to authenticate

查看:254
本文介绍了经典ASP(VBScript)的,2008 R2,使用AD进行身份验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从Win2003的X32网站来Win2008R2 64。它工作正常,旧服务器上。该网站使用Active Directory进行身份验证。我得到2008这个错误:-2147023584:指定的登录会话不存在。它可能已被终止。我曾尝试切换到经典模式等没有变化。它执行的VBScript code(不然我也不会得到错误)。

I have moved a web site from Win2003 x32 to Win2008R2 x64. It works fine on the old server. The web site uses active directory to authenticate. I get this error on 2008: -2147023584 : A specified logon session does not exist. It may already have been terminated. I have tried switching to classic mode, etc. with no change. It does execute VBScript code (otherwise I wouldn't get the error).

下面是code:

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

任何帮助将是AP preciated。谢谢你。

Any help would be appreciated. Thanks.

推荐答案

好了,所以我得到了它的工作。之前,它的工作没有域名,但现在需要它。我认为这是与应用程序池登录旧服务器与这一项上。我要在它的工作多一点。我不想改变所有站点。

Okay, so I got it working. Before it worked without the domain name, but now requires it. I think it has something to do with the app pool logging in on the old server versus this one. I am going to work on it a little more. I don't want to change all the sites.

这篇关于经典ASP(VBScript)的,2008 R2,使用AD进行身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆