TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gnanavel Sekar
NA
8.4k
7.3m
Get the AD users List
Mar 30 2017 5:38 AM
The error is
The server is not operational.
a
m getting this error reach below red marked find all line.... am new to azure can you anyone fix this?
//Domain Name : EnergyFundersDemoB2C.onmicrosoft.com
DirectoryEntry myLdapConnection = new DirectoryEntry("LDAP://EnergyFundersDemoB2C.onmicrosoft.com");
DirectorySearcher search = new DirectorySearcher(myLdapConnection) { Filter = ("(objectClass=user)") };
search.CacheResults = true;
SearchResultCollection allResults = search.FindAll();
DataTable resultsTable = new DataTable();
resultsTable.Columns.Add("UserID");
resultsTable.Columns.Add("EmailID");
foreach (SearchResult searchResult in allResults)
{
MembershipUser myUser = Membership.GetAllUsers()[searchResult.Properties["sAMAccountName"][0].ToString()];
if (myUser == null)
{
DataRow dr = resultsTable.NewRow();
dr["UserID"] = searchResult.Properties["sAMAccountName"][0].ToString();
if (searchResult.Properties["mail"].Count > 0)
{
dr["EmailID"] = searchResult.Properties["mail"][0].ToString();
}
else
{
dr["EmailID"] = "";
}
resultsTable.Rows.Add(dr);
}
else
{ }
}
AllADUsers.DataSource = resultsTable;
AllADUsers.DataBind();
Reply
Answers (
1
)
Jquery server side validation in mvc
Set browser to full screen