Last post Feb 09, 2010 04:49 PM by dilvid
Feb 03, 2010 04:21 AMemail@example.com|LINK
I am using the System.DirectoryServices.UserPrincipal.Current.EmailAddress to fetch the Currently logged in users email from AD.
If debug my sol am getting the Exact mail id of that Particular user for ex:firstname.lastname@example.org.
If i host My Application on iis
And Access my App am getting some other Email id instead of the
I have changed the Application Pool identity to NetWorkService.
Can any one tell what could be wrong
Feb 09, 2010 04:49 PM|dilvid|LINK
Have you altered the settings in IIS to turn off 'Anonymous Access'? This enables the currently logged in user credentials to come through rather than the guest account details.
If this doesn't work the other option is to retrieve the login ID from User.Identity.Name and then perform an LDAP query to retrieve the data your after.