0

我想在浏览器中加载网站后立即从浏览器中获取历史记录。它应该获取客户的浏览器信息并将其保存在数据库中,以便管理员可以查看经常打开的网站并可以对数据进行调查。

4

2 回答 2

1
System.Web.HttpBrowserCapabilities browser = Request.Browser;
string s = "Browser Capabilities\n"
    + "Type = "                    + browser.Type + "\n"
    + "Name = "                    + browser.Browser + "\n"
    + "Version = "                 + browser.Version + "\n"
    + "Major Version = "           + browser.MajorVersion + "\n"
    + "Minor Version = "           + browser.MinorVersion + "\n"
    + "Platform = "                + browser.Platform + "\n"
    + "Is Beta = "                 + browser.Beta + "\n"
    + "Is Crawler = "              + browser.Crawler + "\n"
    + "Is AOL = "                  + browser.AOL + "\n"
    + "Is Win16 = "                + browser.Win16 + "\n"
    + "Is Win32 = "                + browser.Win32 + "\n"
    + "Supports Frames = "         + browser.Frames + "\n"
    + "Supports Tables = "         + browser.Tables + "\n"
    + "Supports Cookies = "        + browser.Cookies + "\n"
    + "Supports VBScript = "       + browser.VBScript + "\n"
    + "Supports JavaScript = "     + 
        browser.EcmaScriptVersion.ToString() + "\n"
    + "Supports Java Applets = "   + browser.JavaApplets + "\n"
    + "Supports ActiveX Controls = " + browser.ActiveXControls 
          + "\n";

Request.Browser用于识别浏览器信息。使用它您可以获得浏览器的所有信息

于 2013-03-11T17:01:53.430 回答
0

IIS 已经为您存储了这些信息。请参阅:http: //msdn.microsoft.com/en-us/library/ms525410%28v=vs.90%29.aspx

为了使这些数据有用,您将需要使用日志分析器工具。

谷歌这个词的一些使用选项:iis 日志分析器

于 2013-03-11T16:55:29.430 回答