Hostname of remote user

  • Thread starter Anders K. Olsen
  • Start date
A

Anders K. Olsen

Hello Group

I'm working on a web application where I need to list all groups that the
current user is a member of. I'm using Integrated Windows Authentication on
the server.

Listing the groups is quite easy with ASP.Net 2.0, and I can do that using:

WindowsIdentity ident = (WindowsIdentity) User.Identity;
foreach (IdentityReference id in ident.groups)
{
NTAccount ac = (NTAccount) id.Translate(typeof(NTAccount));
String group = ac.Value;
}

My problem is that some of the groups belong to the BUILTIN domain, e.g.
BUILTIN\Users.

I assume that BUILTIN refers to the name of the local computer that the user
is using. Do you know of any way that I can look up this computer name?

I have tried Request.ServerVariables["REMOTE_HOST"] and "REMOTE_ADDR", but
they just give me the 127.0.0.1 - the IP address of localhost.

Regards
Anders Olsen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top