We recently upgraded from IIS 6 to IIS 7.5. We moved all of our sites to the new system and they all worked aside from one.
The broken site gives information about out ftp servers, and after some experimenting we determined what code was causing the problem.
This is the line of code that asks the server for the expiration date of the FTP site:
Set objuser = objRoot.OpenDSObject("LDAP://CN="&user&",dc=companySite,OU=FTP", strUserDN, strPassword, ADS_SECURE_AUTHENTICATION)
This is the rest of the function for context:
function expiration(user)
Set con = Server.CreateObject("ADODB.Connection")
con.provider ="ADsDSOObject"
con.open "Active Directory Provider"
Set Com = CreateObject("ADODB.Command")
Set Com.ActiveConnection = con
Const ADS_SECURE_AUTHENTICATION = 1
strUserDN = "cn=ftplist,cn=users,dc=companySite,dc=com"
strPassword = "password"
Set objRoot = GetObject("LDAP:")
Set objuser = objRoot.OpenDSObject("LDAP://CN="&user&",dc=companySite,OU=FTP", strUserDN, strPassword, ADS_SECURE_AUTHENTICATION)
On error resume next
expiry = objuser.AccountExpirationDate
If expiry = "1/1/1970" Or expiry = "1/01/1601 10:00:00 AM" Or Err.Number = -2147467259 then
expiration = "No expiration"
else
expiration = formatdatetime(objuser.AccountExpirationDate, vbshortdate)
end if
response.write expiration
end function
The error the page displays is as follows:
Active Directory error '8007203b'
A local error has occurred.
/ftp-search.asp, line 28
I am unfamiliar with the database our company uses, so I cannot discern what caused the problem. I did some research but have been unable to find a solution so far.
Any tips would be appreciated!