The difference is your cgi script is running under an 'anonymous' usergroup something like IIS_IUSRS
In reply to Re^3: LDAP Connection by poj in thread LDAP Connection by runningz