-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Vichu
Message 1 in Discussion
Thanks mrinal.
I saw the article on the next day it was posted. Nice article. Eventhen i have a
problem in using the code. I am accessing the server from remote. So some of the
codes are not working.
Example:
Dim cnEntry As DirectoryEntry = New DirectoryEntry(sPath, "Administrator", "pass",
AuthenticationTypes.Secure).
If I use ServerBind(as in ur code) instead of secure i am not able to add any user
entries. But if use secure.. i am able to add the user entry except 'password'. For
password it is saying 'Network path not found'. In the sameway i am not able to add
groups,delete groups.....
Have u faced the similar problem?If please help me
I have a basic question, whether LDAP will work only in server?
I pasted the following code for ur reference...
Dim dsUser As DirectoryEntry
Dim activeds As New ActiveDirectoryUserAdding()
Dim sPath As String = "LDAP://godrejite/CN=Users,dc=godrejite,dc=local"
Dim cnEntry As DirectoryEntry = New DirectoryEntry(sPath, "Administrator",
"pass", AuthenticationTypes.Secure)
dsUser = cnEntry.Children.Add("CN=" & strUser, "User")
dsUser.Properties("sAMAccountName").Value = strUser
dsUser.Properties("sn").Value = "viswa"
dsUser.Properties("givenname").Value = "nathan"
dsUser.Properties("mail").Value = "[EMAIL PROTECTED]"
dsUser.CommitChanges()
Dim thisnewUser As IADsUser
thisnewUser = CType(dsUser.NativeObject, IADsUser)
thisnewUser.AccountDisabled = False
thisnewUser.SetPassword("testing")
thisnewUser.SetInfo()
dsUser.Properties("UserAccountControl").Value = 512
dsUser.CommitChanges()
dsUser.Close()
cnEntry.Close()
Regards,
Viswanathan A.S
Wipro Infotech
-----------------------------------------------------------
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]