如何跟踪用户的操作系统 [英] How to Track the user's OS

查看:86
本文介绍了如何跟踪用户的操作系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


将用户的操作系统访问我的网站时遇到问题.
我写的代码如下.


I have a problem to getting the user''s OS to my site.
I write the code as follows.

System.Environment.OSVersion.ToString()


它赋予系统的操作系统而不是用户的操作系统.

如果您知道这一点,请共享信息.

在此先感谢


It gives the System''s Os not the User''s Os.

If you know about this,share the information.

Thanks In Advance

推荐答案

您发布的代码将始终为您提供执行网页的计算机的详细信息,而不是客户端的信息

如果要查看有关客户端的信息,则应使用 UserAgent [^ ] 财产.

另请参阅此处

http://msdn.microsoft.com/en-us/library/ms537503%28v = vs.85%29.aspx [ ^ ]

显然,这取决于客户端计算机向您披露的内容.它们可能会隐藏某些代理设置,因此不能保证此字符串具有一致的行为.
The code you have posted will always give you the details of the machine executing the web page, not the client

If you want to view information about the client, you should use the UserAgent[^] property.

Also see here

http://msdn.microsoft.com/en-us/library/ms537503%28v=vs.85%29.aspx[^]

Obviously, it''s up to the client computer what they disclose to you. They may hide certain agent settings, you can''t be guaranteed consistent behaviour from this string.


您可以使用Request.ServerVariables Collection来查找正在使用的OS用户.

在此处检查 Clickty [
You can use Request.ServerVariables Collection to find out which OS users are using.

Check here Clickty [^] for list of variables available in the collection.

HTTP_USER_AGENT is the one useful for you.


可能会帮助您

may be this will help you

System.Environment.OSVersion.Platform.ToString();




谢谢




thanks


这篇关于如何跟踪用户的操作系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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