<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Getting All Users Information from Domain in ASP.NET</title>
	<atom:link href="http://michaelsync.net/2007/02/24/getting-all-users-information-from-domain-in-aspnet/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelsync.net/2007/02/24/getting-all-users-information-from-domain-in-aspnet</link>
	<description>Sharing our knowledge</description>
	<lastBuildDate>Mon, 30 Apr 2012 09:19:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>	<item>
		<title>By: loay</title>
		<link>http://michaelsync.net/2007/02/24/getting-all-users-information-from-domain-in-aspnet/comment-page-1#comment-300363</link>
		<dc:creator>loay</dc:creator>
		<pubDate>Thu, 05 May 2011 09:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2007/02/24/getting-all-users-information-from-domain-in-aspnet#comment-300363</guid>
		<description>dear
am convert this code to vb.net and always have an error No Children Available when get domain members
and this my code


Try
	Dim searcher As New DirectorySearcher()
	Dim rootDSE As String = searcher.SearchRoot.Path

	Dim entry As New DirectoryEntry(rootDSE)
	&#039;eg: Default Domain
	Dim dirSearcher As New DirectorySearcher(entry)
	dirSearcher.Filter = &quot;(&amp;(objectClass=user))&quot;
	dirSearcher.SearchScope = SearchScope.Subtree
	dirSearcher.Sort.Direction = System.DirectoryServices.SortDirection.Ascending
	dirSearcher.Sort.PropertyName = &quot;cn&quot;

	Dim domainMembers As New ArrayList()

	&#039;Finding all users.
	For Each result As SearchResult In dirSearcher.FindAll()
		Try
			Dim strUserInfo As String = String.Empty
			Dim de As DirectoryEntry = result.GetDirectoryEntry()

			If de.Properties.Contains(&quot;sAMAccountName&quot;) Then
				strUserInfo = de.Properties(&quot;sAMAccountName&quot;).Value.ToString()
			End If

			domainMembers.Add(strUserInfo)
		Catch ex As Exception
			Console.WriteLine(ex.Message)
		End Try
	Next
	DataGrid1.DataSource = domainMembers
	DataGrid1.DataBind()
Catch ex As Exception
	Console.WriteLine(ex.Message)
End Try</description>
		<content:encoded><![CDATA[<p>dear<br />
am convert this code to vb.net and always have an error No Children Available when get domain members<br />
and this my code</p>
<p>Try<br />
	Dim searcher As New DirectorySearcher()<br />
	Dim rootDSE As String = searcher.SearchRoot.Path</p>
<p>	Dim entry As New DirectoryEntry(rootDSE)<br />
	&#8216;eg: Default Domain<br />
	Dim dirSearcher As New DirectorySearcher(entry)<br />
	dirSearcher.Filter = &#8220;(&amp;(objectClass=user))&#8221;<br />
	dirSearcher.SearchScope = SearchScope.Subtree<br />
	dirSearcher.Sort.Direction = System.DirectoryServices.SortDirection.Ascending<br />
	dirSearcher.Sort.PropertyName = &#8220;cn&#8221;</p>
<p>	Dim domainMembers As New ArrayList()</p>
<p>	&#8216;Finding all users.<br />
	For Each result As SearchResult In dirSearcher.FindAll()<br />
		Try<br />
			Dim strUserInfo As String = String.Empty<br />
			Dim de As DirectoryEntry = result.GetDirectoryEntry()</p>
<p>			If de.Properties.Contains(&#8220;sAMAccountName&#8221;) Then<br />
				strUserInfo = de.Properties(&#8220;sAMAccountName&#8221;).Value.ToString()<br />
			End If</p>
<p>			domainMembers.Add(strUserInfo)<br />
		Catch ex As Exception<br />
			Console.WriteLine(ex.Message)<br />
		End Try<br />
	Next<br />
	DataGrid1.DataSource = domainMembers<br />
	DataGrid1.DataBind()<br />
Catch ex As Exception<br />
	Console.WriteLine(ex.Message)<br />
End Try</p>
]]></content:encoded>
	</item>
</channel>
</rss>

