Advertisement

04.17.2008 at 02:33AM PDT, ID: 23330209
[x]
Attachment Details

Getting Active Directory e-mail using system.Directoryservices

Asked by edjones1 in .NET, .Net Editors & IDEs, Visual Studio

Tags:

Hi

I'm trying to get a logged on uses e-mal address using system.directoryservices. My website is protected with windows authentication and I am able to get the logged on uses username with the code I've posted below. Could somone tell me how to extract the e-mail address from the active directoy too?  ThanksStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Imports System.Net.Mail
Imports System.Net
Imports System.Security
Imports System.DirectoryServices
Partial Class ReportFault
 
 
    Inherits System.Web.UI.Page
 
  
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim authUserName As String
        Dim aspUserName As String
 
        authUserName = User.Identity.Name
        aspUserName = Principal.WindowsIdentity.GetCurrent.Name
[+][-]04.17.2008 at 02:36AM PDT, ID: 21375448

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, .Net Editors & IDEs, Visual Studio
Tags: asp.net
Sign Up Now!
Solution Provided By: Dhaest
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.22.2008 at 02:10AM PDT, ID: 21621951

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 05:19AM PDT, ID: 21645958

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628