protected void Page_Load(object sender, EventArgs e) { 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 += "<hr/>"; info += "<br/>客户端的操作系统:" + Request.Browser.Platform; info += "<br/>是不是win16系统:" + Request.Browser.Win16; info += "<br/>是不是win32系统:" + Request.Browser.Win32; Response.Write(info); Response.End(); } 最好不用string 影响性能!用时改一下 获取安装路径: System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(string.Format("当前时间: {0}", Server.HtmlEncode(DateTime.Now.ToString()))); sb.Append("<br />"); sb.Append(string.Format("当前请求的虚拟路径: {0}",Server.HtmlEncode(Request.CurrentExecutionFilePath))); sb.Append("<br />"); sb.Append(string.Format("获取当前应用程序的根目录路径: {0}", Server.HtmlEncode(Request.ApplicationPath))); sb.Append("<br />"); sb.Append(string.Format("当前请求的虚拟路径: {0}",Server.HtmlEncode(Request.FilePath))); sb.Append("<br />"); sb.Append(string.Format("当前请求的虚拟路径: {0}",Server.HtmlEncode(Request.Path))); sb.Append("<br />"); sb.Append(string.Format("获取当前正在执行的应用程序的根目录的物理文件系统路径: {0}", Server.HtmlEncode(Request.PhysicalApplicationPath))); sb.Append("<br />"); sb.Append(string.Format("获取与请求的 URL 相对应的物理文件系统路径: {0}", Server.HtmlEncode(Request.PhysicalApplicationPath))); sb.Append("<br />"); Response.Write(sb.ToString());