Click here to Skip to main content
15,922,325 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is there a bug in the treeView.Nodes.Find method?? Pin
Rafone19-Dec-08 7:32
Rafone19-Dec-08 7:32 
QuestionDeploying an application written in C# 2005 Special Edition Pin
AngusOAP19-Dec-08 6:15
AngusOAP19-Dec-08 6:15 
QuestionHook Child events into Parent UserControl Pin
mmuttmax19-Dec-08 5:33
mmuttmax19-Dec-08 5:33 
Questionimport csv. Read not a problem, just cannot display the columns Pin
arenaldo19-Dec-08 4:51
arenaldo19-Dec-08 4:51 
AnswerRe: import csv. Read not a problem, just cannot display the columns Pin
Le centriste19-Dec-08 4:55
Le centriste19-Dec-08 4:55 
QuestionHow to invoke multiple webmethods at a once? Pin
venkat.st19-Dec-08 3:32
venkat.st19-Dec-08 3:32 
AnswerRe: How to invoke multiple webmethods at a once? Pin
Le centriste19-Dec-08 4:56
Le centriste19-Dec-08 4:56 
QuestionDirectory Services Pin
Jacob D Dixon19-Dec-08 3:30
Jacob D Dixon19-Dec-08 3:30 
I am needing to get AD information from a user logon name like AEM\jdixon

Im using this for a website to authenticate people to get their Division, First and Last name automatically without them having to sign in or anything.

This is what I have:

using (DirectoryEntry root = new DirectoryEntry())
{
    root.Username = username;
    root.Password = password;
    root.Path = LDAPPath;

    using (DirectorySearcher searcher = new DirectorySearcher())
    {
        searcher.SearchRoot = root;
        searcher.SearchScope = SearchScope.Subtree;
        searcher.Filter = "(objectClass=user)";
        searcher.PropertiesToLoad.Add("msDS-PrincipalName");
                            seacher.PropertiesToLoad.Add("divison");

        SearchResultCollection results = searcher.FindAll();
        StringBuilder summary = new StringBuilder();
        foreach (SearchResult result in results)
        {
            foreach (string propName in result.Properties.PropertyNames)
            {
                foreach (string s in result.Properties[propName])
                {
                    summary.Append(" " + propName + ": " + s + "\r\n");
                }
            }
            summary.Append("\r\n");
        }
        textBoxResults.Text = summary.ToString();
    }
}


Now I got this from someone else on here that I seen in an article. But I also have my book here and I'm not seeing what I want to do. See in ASP.net you can get their Windows Logon name simple right? Which would pull (lets use mine for example) AEM\JDIXON

So now that I have AEM\JDIXON, I want to search AD (first to make sure it exist) and if it exist I want it to pull what DIVISON and the First and Last name. This is for a ticket application.
QuestionFtp Transfer Server to Server Pin
New78019-Dec-08 3:12
New78019-Dec-08 3:12 
AnswerRe: Ftp Transfer Server to Server Pin
Rutvik Dave19-Dec-08 3:28
professionalRutvik Dave19-Dec-08 3:28 
GeneralRe: Ftp Transfer Server to Server Pin
New78019-Dec-08 4:21
New78019-Dec-08 4:21 
GeneralRe: Ftp Transfer Server to Server Pin
Rutvik Dave19-Dec-08 5:25
professionalRutvik Dave19-Dec-08 5:25 
GeneralRe: Ftp Transfer Server to Server Pin
New78025-Dec-08 23:17
New78025-Dec-08 23:17 
Questionhow to convert c++ to C# ? Pin
lockepeak19-Dec-08 2:39
lockepeak19-Dec-08 2:39 
AnswerRe: how to convert c++ to C# ? Pin
DaveyM6919-Dec-08 2:46
professionalDaveyM6919-Dec-08 2:46 
AnswerRe: how to convert c++ to C# ? Pin
Dave Doknjas19-Dec-08 12:44
Dave Doknjas19-Dec-08 12:44 
QuestionLoop through and process every php code. Pin
jafingi19-Dec-08 1:13
jafingi19-Dec-08 1:13 
AnswerRe: Loop through and process every php code. Pin
Jens Meyer19-Dec-08 1:35
Jens Meyer19-Dec-08 1:35 
GeneralRe: Loop through and process every php code. [modified] Pin
jafingi19-Dec-08 1:51
jafingi19-Dec-08 1:51 
GeneralRe: Loop through and process every php code. Pin
Gideon Engelberth19-Dec-08 3:18
Gideon Engelberth19-Dec-08 3:18 
QuestionProblem regarding grid Pin
ais0719-Dec-08 0:59
ais0719-Dec-08 0:59 
AnswerRe: Problem regarding grid Pin
Ashfield19-Dec-08 1:30
Ashfield19-Dec-08 1:30 
QuestionHow we can plugin the C# program to Eclipse Pin
TJS4u18-Dec-08 23:54
TJS4u18-Dec-08 23:54 
AnswerRe: How we can plugin the C# program to Eclipse Pin
Ashfield19-Dec-08 1:29
Ashfield19-Dec-08 1:29 
QuestionHow can I use a MemoryStream in a System.Generic.List<> Pin
mbudak18-Dec-08 23:31
mbudak18-Dec-08 23:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.