如何使用asp.net(c#)获取客户端上主板/硬盘的序列号 [英] how to get serial number of motherboard/harddisk on client using asp.net (c#)

查看:208
本文介绍了如何使用asp.net(c#)获取客户端上主板/硬盘的序列号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

再见.

如何使用asp.net(C#)获取客户端主板/硬盘序列号.有可能吗?

我尝试了以下教程中的代码,但是获得了部署Web应用程序的服务器的主板序列号.

Hi again.

How to get client Motherboard/hard disk serial number using asp.net (C#). Is it possible?

I tried below code from tutorial, but I get the motherboard serial number of the server where I deploy my web application.

ManagementScope scope = new ManagementScope("\\\\" + Environment.MachineName + "\\root\\cimv2");
            
scope.Connect();
            
ManagementObject wmiClass = new ManagementObject(scope, new ManagementPath("Win32_BaseBoard.Tag=\"Base Board\""), new ObjectGetOptions());
            
foreach (PropertyData propData in wmiClass.Properties)            
{                
SerialNumber = scope.Path.ToString();             
}



请帮忙.

问候,

Naijeru



Please help.

Regards,

Naijeru

推荐答案

好吧,除了服务器端操作会为您提供服务器主机信息之外,您应该没有任何期望.当然,有充分的理由,这不可能获得任何客户信息.如果可能会使用Web,那么为什么会使用它呢?

例如,制造商的服务站点通过在用户许可下安装一些客户端软件来收集客户端系统信息来进行此操作.当然,有可能使用某些社会工程学方法诱使幼稚的用户未经他们的同意安装某些东西,但这将更多地是网络犯罪. :-)

—SA
Well, you should not have expected anything but server-side operation giving you the server host information. Of course this is impossible to get any client information, for a good reason. Why would use the Web if it could be this intrusive?

Manufacturer''s service sites, for example, do it by installing some client-side software to gather client system information, with the user''s permission. Of course, it''s possible to trick naive users, using some methods of social engineering, into installing something without their consent, but this would be more of a cyber crime. :-)

—SA


这篇关于如何使用asp.net(c#)获取客户端上主板/硬盘的序列号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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