Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
Newsjumping over versions Pin
ranandbe9-May-06 0:29
ranandbe9-May-06 0:29 
GeneralRe: jumping over versions Pin
CWIZO9-May-06 0:40
CWIZO9-May-06 0:40 
QuestionRe: jumping over versions Pin
ranandbe9-May-06 1:50
ranandbe9-May-06 1:50 
AnswerRe: jumping over versions Pin
Robert Rohde9-May-06 2:01
Robert Rohde9-May-06 2:01 
AnswerRe: jumping over versions Pin
CWIZO9-May-06 6:33
CWIZO9-May-06 6:33 
AnswerRe: How to paging datagrid? Pin
Stefan Troschuetz9-May-06 0:03
Stefan Troschuetz9-May-06 0:03 
QuestionHow to paging datagrid? Pin
Robert Wang19838-May-06 23:53
Robert Wang19838-May-06 23:53 
QuestionReturning AD values in C# Pin
lee.jones8-May-06 23:48
lee.jones8-May-06 23:48 
Im just starting to play with manipulating Active Directory using C# (never done any C# before).
I've followed some examples and extracted data for a given user, but its returning some odd data as follows:

badPasswordTime = System.__ComObject
lastLogoff = System.__ComObject
lastLogon = System.__ComObject
pwdLastSet = System.__ComObject


What is "System.__ComObject" and why am I not getting numeric data back?
Am I doing something wrong or missing something?

The code I am using (just a sample pulled off the web) is as follows:

<code> static void Main(string[] args)
{
string path = "LDAP://domain.com";
DirectoryEntry entry = new DirectoryEntry(path,"USERNAME","PASSWORD");

try{
Object native = entry.NativeObject;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(SAMAccountName=ADTEST)";

foreach(SearchResult result in search.FindAll())
{
DirectoryEntry dirEntry = result.GetDirectoryEntry();
foreach (string key in dirEntry.Properties.PropertyNames)
{
foreach (Object propValue in dirEntry.Properties[key])
{
Console.WriteLine(key + " = " + propValue);
}
}
}
}
catch( Exception ex )
{ throw new Exception(ex.Message); }
Console.ReadKey();
}
}
}</code>

Any suggestions welcomed.......Thanks!
QuestionInstallation path needed Pin
Willem_Le_Roux8-May-06 23:38
Willem_Le_Roux8-May-06 23:38 
Questionhow to display selected items of a listbox into a datagrid at runtime Pin
narendrakumarp8-May-06 23:26
narendrakumarp8-May-06 23:26 
AnswerRe: how to display selected items of a listbox into a datagrid at runtime Pin
goyal manish8-May-06 23:59
goyal manish8-May-06 23:59 
GeneralRe: how to display selected items of a listbox into a datagrid at runtime Pin
nivasinfotech9-May-06 0:06
nivasinfotech9-May-06 0:06 
Questionthe exception can not be handled.... Pin
m.rastgar8-May-06 23:14
m.rastgar8-May-06 23:14 
QuestionImages in Richtextbox Pin
_mubashir8-May-06 22:59
_mubashir8-May-06 22:59 
Questionqueer error message Pin
occcy8-May-06 22:26
occcy8-May-06 22:26 
AnswerRe: queer error message Pin
delftred26-May-09 19:05
professionaldelftred26-May-09 19:05 
GeneralRe: queer error message Pin
occcy26-May-09 20:35
occcy26-May-09 20:35 
QuestionFill dataset Pin
Rmokkenstorm8-May-06 22:11
Rmokkenstorm8-May-06 22:11 
Questionhow to define an array? Pin
susan200620068-May-06 21:56
susan200620068-May-06 21:56 
AnswerRe: how to define an array? Pin
sathish s8-May-06 22:04
sathish s8-May-06 22:04 
AnswerRe: how to define an array? Pin
Shajeel8-May-06 22:08
Shajeel8-May-06 22:08 
QuestionConverting DataTable into an array of Bytes Pin
Mohamed El Gohary8-May-06 21:53
Mohamed El Gohary8-May-06 21:53 
QuestionSQL Query String Pin
cshivaprasad8-May-06 21:29
cshivaprasad8-May-06 21:29 
AnswerRe: SQL Query String Pin
J4amieC8-May-06 21:58
J4amieC8-May-06 21:58 
GeneralRe: SQL Query String Pin
cshivaprasad9-May-06 0:36
cshivaprasad9-May-06 0:36 

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.