Get domain user from IPAddress or Hostname in .Net

We are trying to implement a special solution for Growl for Windows. We tell the Growl client to subscribe to notifications from our server. The server then receives a message from the client via GNTP (Growl Exchange Protocol). We require a username registered on the client machine in order to search the database. GNTP does not provide this information.

So, we have a connected client socket (and, therefore, an IP address) and a message from this client containing its machine name.

Is there any possible way to determine the username registered on the specified computer? We have access to Windows domain services.

0
source share
2 answers

We ended up working with the reverse (sorta) by running the client-side application at the login and telling our server which user was registered.

0
source

This will give you the Windows domain and current user (if you need it)

using System.Security.Principal;

        if (WindowsIdentity.GetCurrent().IsAuthenticated)
        {
            string Result = WindowsIdentity.GetCurrent().Name;
0
source

Source: https://habr.com/ru/post/1739926/


All Articles