如何获取客户端计算机ID或客户端计算机名称 [英] How to get client machine ID or Client Machine Name

查看:620
本文介绍了如何获取客户端计算机ID或客户端计算机名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个地方有多台机器.在这里,我们无法实现IP.我们与客户端计算机ID或名称有关.那么如何获取客户端计算机ID?

我想维护基于机器的登录系统.我有库存产品.在那里,我需要基于机器的登录系统.就像,-如果管理员告诉某人Mr.A可以从10号机登录.然后,他可以从10号计算机登录,而不能从其他计算机登录.

I have more than one machine in a place. Here we cant implement IP. We have to do with Client Machine ID or Name. So How I can get Client machine ID?

I want to maintain machine based login systems. i have a inventory product. There I need machine based login systems. Like,- If Admin tells that a Person Mr.A can login from Machine no 10 . Then he can login from machine no 10 not from other machine.

推荐答案

选中此链接将对您有所帮助

链接 [
check this link it will help

link[^]


String strHostName = "";
            strHostName = Dns.GetHostName();
            MessageBox.Show(strHostName.ToString());
            IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
            IPAddress[] addr = ipEntry.AddressList;

            for (int i = 0; i < addr.Length; i++)
            {
                MessageBox.Show(addr[i].ToString());
            }


这篇关于如何获取客户端计算机ID或客户端计算机名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆