Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: My tables hate me Pin
Colin Angus Mackay28-Sep-07 10:08
Colin Angus Mackay28-Sep-07 10:08 
GeneralRe: My tables hate me Pin
Evan St. John2-Oct-07 6:51
Evan St. John2-Oct-07 6:51 
AnswerRe: My tables hate me Pin
rowdykuttan28-Sep-07 5:26
rowdykuttan28-Sep-07 5:26 
GeneralRe: My tables hate me Pin
Evan St. John28-Sep-07 5:36
Evan St. John28-Sep-07 5:36 
QuestionCustom Drawing of list Items Background Pin
Sukhjinder_K28-Sep-07 3:19
Sukhjinder_K28-Sep-07 3:19 
AnswerRe: Custom Drawing of list Items Background Pin
TJoe28-Sep-07 6:19
TJoe28-Sep-07 6:19 
GeneralIt Works Pin
Sukhjinder_K28-Sep-07 6:31
Sukhjinder_K28-Sep-07 6:31 
QuestionActive Directory Pin
Justin Perez28-Sep-07 2:54
Justin Perez28-Sep-07 2:54 
I have been working with Active Directory in an app, and all has been fine til now Mad | :mad: I am able to get the current user that is logged on to our company domian, and get their full name based on that, by doing this:

WindowsIdentity user = WindowsIdentity.GetCurrent();

string u = user.Name;
u = u.Replace('\\', '/');
Console.WriteLine(u);
try
{
  DirectoryEntry e = new DirectoryEntry("WinNT://" + u);
  return (string)e.Properties["FullName"].Value;
}
catch (Exception)
{
  return null;
}


Now, I want to get that users E-Mail address, but it will not return it. I have scoured every available resource, and I'm coming up with nada. From what I have read, returning the E-Mail address is as simple as changing

return (string)e.Properties["FullName"].Value;

to this:

return (string)e.Properties["mail"].Value;

anyone does this or have any ideas?

I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")

AnswerRe: Active Directory Pin
Justin Perez28-Sep-07 3:52
Justin Perez28-Sep-07 3:52 
QuestionChange IP Address of an IP Packet Pin
naezl28-Sep-07 2:02
naezl28-Sep-07 2:02 
AnswerRe: Change IP Address of an IP Packet Pin
Colin Angus Mackay28-Sep-07 3:14
Colin Angus Mackay28-Sep-07 3:14 
QuestionMy customer should dot net framework be installed on his device to open and use my application? Pin
Yasser Abu Elmakarem28-Sep-07 2:01
Yasser Abu Elmakarem28-Sep-07 2:01 
AnswerRe: My customer should dot net framework be installed on his device to open and use my application? Pin
Pete O'Hanlon28-Sep-07 2:11
mvePete O'Hanlon28-Sep-07 2:11 
AnswerRe: My customer should dot net framework be installed on his device to open and use my application? Pin
Dan Neely28-Sep-07 2:11
Dan Neely28-Sep-07 2:11 
GeneralRe: My customer should dot net framework be installed on his device to open and use my application? Pin
Vasudevan Deepak Kumar28-Sep-07 2:21
Vasudevan Deepak Kumar28-Sep-07 2:21 
GeneralRe: My customer should dot net framework be installed on his device to open and use my application? Pin
Dan Neely28-Sep-07 2:40
Dan Neely28-Sep-07 2:40 
QuestionRecord in Txt Pin
Can_8528-Sep-07 1:56
Can_8528-Sep-07 1:56 
AnswerRe: Record in Txt Pin
Colin Angus Mackay28-Sep-07 2:00
Colin Angus Mackay28-Sep-07 2:00 
QuestionREFRESH the database after updating Pin
prasadbuddhika28-Sep-07 1:50
prasadbuddhika28-Sep-07 1:50 
AnswerRe: REFRESH the database after updating Pin
Malcolm Smart28-Sep-07 2:38
Malcolm Smart28-Sep-07 2:38 
QuestionProblem with font and GDI+ Pin
Bin2Hex28-Sep-07 1:39
Bin2Hex28-Sep-07 1:39 
Questioninserting control into DataGridView rows Pin
half-life28-Sep-07 1:22
half-life28-Sep-07 1:22 
AnswerRe: inserting control into DataGridView rows Pin
half-life28-Sep-07 1:35
half-life28-Sep-07 1:35 
QuestionGetting REG_MULTI_SZ values into a listbox Pin
Lucy28-Sep-07 0:24
Lucy28-Sep-07 0:24 
QuestionRe: Getting REG_MULTI_SZ values into a listbox [modified] Pin
Lucy28-Sep-07 1:53
Lucy28-Sep-07 1:53 

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.