The problem seems to have started with our last w2k DC was demoted. Here's the offending section of Code:
Set objDomain = GetObject ("LDAP://mydc/RootDSE")
objADsPath = objDomain.Get("DefaultNamingContext")
Set objDomain = Nothing
Set con = Server.CreateObject("ADODB.Connection")
Set Com = Server.CreateObject("ADODB.Command")
con.provider ="ADsDSOObject"
con.open "Active Directory Provider"
Set Com.ActiveConnection = con
Com.CommandText = "SELECT AdsPath FROM 'LDAP://" & objADsPath & "' WHERE sAMAccountname='" & user & "'"
Set rs = Com.Execute
set objUser = GetObject(rs.Fields("AdsPath").Value)
Originally I was using Set objDomain = GetObject ("GC://RootDSE") but have made several variations hoping to get better results.
I've also tried sending domain admin credentials:
con.open "Active Directory Provider", "domain\domainadmin", "password"
But get this error from the ASP page. "An External Object Raised an Error. No Error Description Available"
Set objDomain = GetObject ("LDAP://mydc/RootDSE")
objADsPath = objDomain.Get("DefaultNamingContext")
Set objDomain = Nothing
Set con = Server.CreateObject("ADODB.Connection")
Set Com = Server.CreateObject("ADODB.Command")
con.provider ="ADsDSOObject"
con.open "Active Directory Provider"
Set Com.ActiveConnection = con
Com.CommandText = "SELECT AdsPath FROM 'LDAP://" & objADsPath & "' WHERE sAMAccountname='" & user & "'"
Set rs = Com.Execute
set objUser = GetObject(rs.Fields("AdsPath").Value)
Originally I was using Set objDomain = GetObject ("GC://RootDSE") but have made several variations hoping to get better results.
I've also tried sending domain admin credentials:
con.open "Active Directory Provider", "domain\domainadmin", "password"
But get this error from the ASP page. "An External Object Raised an Error. No Error Description Available"