获取服务器信息

来源:百度文库 编辑:神马文学网 时间:2024/05/01 12:01:34
 //服务器类型
this.lblIp.Text = Request.ServerVariables["LOCAL_ADDR"];
//服务器的主机名
this.lblZhujiName.Text = Request.ServerVariables["LOGON_USER"];
//站点物理路径
this.lblPath.Text = Request.ServerVariables["PATH_TRANSLATED"];
//服务器处理请求的端口
this.lblPort.Text = Request.ServerVariables["SERVER_PORT"];
//web服务器的名称和版本
this.lblWebName.Text = Request.ServerVariables["SERVER_NAME"];
//协议的名称和版本
this.Label5.Text = Request.ServerVariables["SERVER_PROTOCOL"];
//客户端操作系统
this.Label6.Text = "Windows2000";