简体   繁体   English

C#如何获取客户端计算机上的总RAM大小

[英]c# How do I get total RAM size on client machine

How do I get total amount of RAM on the client machine? 如何获得客户端计算机上的RAM总量? I know how to get RAM size from the server side as my code is hosted on the server but how do I retrieve client system information. 我知道如何在服务器上托管我的代码时从服务器端获取RAM大小,但是如何检索客户端系统信息。

Client-side logic needs to be executed using JavaScript (or a browser extension), which is sandboxed, and doesn't provide access to that kind of information. 客户端逻辑需要使用JavaScript(或浏览器扩展程序)执行,该程序已被沙盒化,并且不提供对此类信息的访问。 Per this answer , it can't be done transparently. 根据这个答案 ,它不可能透明地完成。 However, if this information is important for your application, you could use some technique that involves explicit user action, such as asking them to run an executable that communicates with your server. 但是,如果此信息对您的应用程序很重要,则可以使用一些涉及显式用户操作的技术,例如要求他们运行与服务器通信的可执行文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM