Hi,
I have a form which will be used to log tech support calls. What happens is a user enters in a username and I want to return a firstname, lastname, and email address.
I have this working if it gets the currently logged on user via Request.LogonUserIdentity.User and it returns the name and email address but not for the user calling in.
I included a sample of what I'm trying to do but of course you can't go directlly from username to sid as shown in line one.1 Dim user As System.Security.Principal.SecurityIdentifier = txtUserName.Text.Trim 'error here .
2
3 Dim dir As New DirectoryEntry("LDAP://<SID=" + SidToHex(user) + ">")
4 dir = New DirectoryEntry("LDAP://" + DirectCast(dir.Properties("distinguishedName")(0), String), Nothing, Nothing, AuthenticationTypes.Secure Or AuthenticationTypes.ReadonlyServer)
5
6 FirstName = dir.Properties("givenName")(0).ToString
7 LastName = dir.Properties("sn")(0).ToString
8 EmailAddress = dir.Properties("mail")(0).ToString
9