2

我们有一个 Web 应用程序,用户可以在其中将文件上传到我们的服务器。我们需要找到以下客户的详细信息,以便我们了解我们的用户群

  1. 操作系统与版本
  2. 带版本的浏览器
4

3 回答 3

1

查看HttpRequest.Browser以获取浏览器标识符。有关操作系统的信息,请参阅此SO 帖子。

来自上述链接的示例:

HttpBrowserCapabilities bc = Request.Browser;
 Response.Write("<p>Browser Capabilities:</p>");
 Response.Write("Type = " + bc.Type + "<br>");
 Response.Write("Name = " + bc.Browser + "<br>");
 Response.Write("Version = " + bc.Version + "<br>");
 Response.Write("Major Version = " + bc.MajorVersion + "<br>");
 Response.Write("Minor Version = " + bc.MinorVersion + "<br>");
 Response.Write("Platform = " + bc.Platform + "<br>");
 Response.Write("Is Beta = " + bc.Beta + "<br>");
 Response.Write("Is Crawler = " + bc.Crawler + "<br>");
 Response.Write("Is AOL = " + bc.AOL + "<br>");
 Response.Write("Is Win16 = " + bc.Win16 + "<br>");
 Response.Write("Is Win32 = " + bc.Win32 + "<br>");
 Response.Write("Supports Frames = " + bc.Frames + "<br>");
 Response.Write("Supports Tables = " + bc.Tables + "<br>");
 Response.Write("Supports Cookies = " + bc.Cookies + "<br>");
 Response.Write("Supports VB Script = " + bc.VBScript + "<br>");
 Response.Write("Supports JavaScript = " + bc.JavaScript + "<br>");
 Response.Write("Supports Java Applets = " + bc.JavaApplets + "<br>");
 Response.Write("Supports ActiveX Controls = " + bc.ActiveXControls + "<br>");
 Response.Write("CDF = " + bc.CDF + "<br>");
于 2013-02-28T08:45:46.923 回答
1

对于操作系统,请尝试:

Request.Browser.Platform

对于带有版本的浏览器,请尝试:

Request.UserAgent

要查看用户代理对应的内容(如果您不确定),请参考http://www.user-agents.org/index.shtml?moz

于 2013-02-28T08:47:15.733 回答
0

检查

Request.Browser 属性

于 2013-02-28T08:45:32.283 回答