Help me! How I could make user in active directory
From: Sara Rafiee via .NET 247 (anonymous_at_dotnet247.com)
Date: 10/31/04
- Next message: Matthew Owens via .NET 247: "Response.ReDirect / FormsAuth.ForwardFromLogin not working"
- Previous message: Robert Hurlbut: "Re: Another form of encrytion? "Not SSL""
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Help me! How I could make user in active directory"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Help me! How I could make user in active directory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 31 Oct 2004 03:55:00 -0800
hello
can anyone help me making user in active directory , I wrote a code, but it could't work, could anyone correct it. thanks in advance.
Sub example()
'Put user code to initialize the page here
'Try
Dim AD As DirectoryEntry = _
New DirectoryEntry("LDAP://mydomian", "adminuser", "adminpassword", AuthenticationTypes.Secure Or AuthenticationTypes.Sealing)
Dim NewUser As DirectoryEntry = AD.Children.Add("TestUser1", "user")
NewUser.Invoke("SetPassword", New Object() {"12345Abc"})
NewUser.Invoke("Put", New Object() {"Description", "Test User from .NET"})
NewUser.CommitChanges()
Dim grp As DirectoryEntry
grp = AD.Children.Find("Guests", "group")
If grp.Name <> "" Then
grp.Invoke("Add", New Object() {NewUser.Path.ToString()})
End If
'Catch ex As Exception
' Console.WriteLine(ex.Message)
' Console.ReadLine()
'End Try
End Sub
--------------------------------
From: Sara Rafiee
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>w/HG3eHg3EaGJ5kARLMuBw==</Id>
- Next message: Matthew Owens via .NET 247: "Response.ReDirect / FormsAuth.ForwardFromLogin not working"
- Previous message: Robert Hurlbut: "Re: Another form of encrytion? "Not SSL""
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Help me! How I could make user in active directory"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Help me! How I could make user in active directory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]