.NET获取客户端信息 (C#)
string info = "客户端IP:" + Page.Request.UserHostAddress;
info += "<br/>用户信息:" + Page.User;
info += "<br/>服务器电脑名称:" + Page.Server.MachineName;
info += "<br/>当前用户电脑名称:" + System.Net.Dns.GetHostName();
info += "<br/>当前电脑名:" + System.Environment.MachineName;
info += "<br/>当前电脑所属网域:" + System.Environment.UserDomainName;
info += "<br/>当前电脑用户:" + System.Environment.UserName;
info += "<hr/>";
info += "<br/>浏览器类型:" + Request.Browser.Browser;
info += "<br/>浏览器标识:" + Request.Browser.Id;
info += "<br/>浏览器版本号:" + Request.Browser.Version;
info += "<br/>浏览器是不是测试版本:" + Request.Browser.Beta;
info += "<br/>浏览器的分辨率(像素):" + Request["width"].ToString() + "*" + Request["height"].ToString();//1280/1024
info += "<hr/>";
info += "<br/>客户端的操作系统:" + Request.Browser.Platform;
info += "<br/>是不是win16系统:" + Request.Browser.Win16;
info += "<br/>是不是win32系统:" + Request.Browser.Win32;
Response.Write(info);
Response.End();
版权声明:本博文原创发表于博客园,作者博客:YuBinfeng's Technology Blog
| |