我有下面的代码,以获得用户的详细信息:我怎样检测用户操作系统
HttpBrowserCapabilities bc = HttpContext.Current.Request.Browser;
string UserAgent = HttpContext.Current.Request.UserAgent;
ENT_TrackingData ret = new ENT_TrackingData()
{
IPAddress = HttpContext.Current.Request.UserHostAddress,
Browser = bc.Browser + " " + bc.Version,
DateStamp = DateTime.Now,
PageViewed = HttpContext.Current.Request.Url.AbsolutePath,
NodeId = UmbracoHelper.GetCurrentNodeID(),
IsMobileDevice = IsMobileDevice(UserAgent),
Platform = bc.Platform
};
这个伟大的工程,但我注意到,该平台一直称Windows NT我的机器不能在Windows 7有什么在ASP.Net中检测这种类型的信息的方法?
如果您使用的是Windows 7,你的平台_is_ “Windows NT”。也许你需要寻找能够给你平台版本号的东西? – 2012-03-16 09:27:20
请阅读下面的答案以获取最新的解决方案。 – 2016-08-09 08:16:23