-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: satishvd123
Message 1 in Discussion





Dear Friends,



I am working on an ASP Project.I have a small problem in authenticating the user using 
Active Directory Service Interface.


Please help me in resolving this.



Issue:


======


It is not validating when there is a password., but if password is blank it is 
validating the user

I am trying with two approaches but both are failing.



First:


        lstrADSPath = "WinNT://" & pstrDomain


        Set lobjADsNameSpace = GetObject("WinNT:")


        Set lobjADsObject = lobjADsNameSpace.OpenDSObject(lstrADSPath, lstrUserName, 
pstrPwd, 0)


         If Err.Number <> 0 Then


                ErrMessage = "Invalid active direcory login. " & Err.Description


                        ValidateUser = False


else    


        ValidateUser = True


         Exit Function


End If



Second:


        First Validating the user id


        next validating the password



'Validate the user


lstrADSIPath = "WinNT://" & lstrDomain & "/" & lstrUser


Set lobjUser = GetObject(lstrADSIPath)



  If Err.Number <> 0 Then


        ValidateUser = False


 end if



 lobjUser.ChangePassword lstrPassword, lstrPassword


        


        If Err.Number <> 0 Then


                ValidateUser = False


                Exit Function


        Else


                        ValidateUser = True


        End If





regards


satish


















-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to