一厂MES,含注塑,喷涂,冲孔
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

76 lines
4.1 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MESWebSite.Manage
{
public partial class Index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string username = "";
string userID = "";
if (Request.Cookies["LoginUserInfo"] != null)
{
username = Request.Cookies["LoginUserInfo"]["RealName"].Trim();
userID = Request.Cookies["LoginUserInfo"]["UserID"].Trim();
}
if (!string.IsNullOrWhiteSpace(username))
{
lbl_UserName.Text = HttpUtility.UrlDecode(username, System.Text.Encoding.UTF8);
txt_UserID.Text = userID;
}
else
{
Response.Write("<script language=javascript>alert('您的登录信息已过期,请重新登录!');top.location.href='../Login.aspx';</script>");
}
this.ServerInformation.Text = "服务器地址: " + Request.ServerVariables.Get("Remote_Host").ToString() + "<br/><br/>"
+ "浏览器: " + Request.Browser.Browser + "<br/><br/>"
+ "浏览器版本号: " + Request.Browser.MajorVersion + "<br/><br/>"
+ "客户端平台: " + Request.Browser.Platform + "<br/><br/>"
+ "服务器ip: " + Request.ServerVariables.Get("Local_Addr").ToString() + "<br/><br/>"
+ "服务器名: " + Request.ServerVariables.Get("Server_Name").ToString() + "<br/><br/>"
+ "服务器地址: " + Request.ServerVariables["Url"].ToString() + "<br/><br/>"
+ "客户端提供的路径信息: " + Request.ServerVariables["Path_Info"].ToString() + "<br/><br/>"
+ "与应用程序元数据库路径相应的物理路径: " + Request.ServerVariables["Appl_Physical_Path"].ToString() + "<br/><br/>"
+ "通过由虚拟至物理的映射后得到的路径: " + Request.ServerVariables["Path_Translated"].ToString() + "<br/><br/>"
+ "执行脚本的名称: " + Request.ServerVariables["Script_Name"].ToString() + "<br/><br/>"
+ "接受请求的服务器端口号: " + Request.ServerVariables["Server_Port"].ToString() + "<br/><br/>"
+ "发出请求的远程主机的IP地址: " + Request.ServerVariables["Remote_Addr"].ToString() + "<br/><br/>"
+ "发出请求的远程主机名称IP地址: " + Request.ServerVariables["Remote_Host"].ToString() + "<br/><br/>"
+ "返回接受请求的服务器地址IP地址: " + Request.ServerVariables["Local_Addr"].ToString() + "<br/><br/>"
+ "返回服务器地址IP地址: " + Request.ServerVariables["Http_Host"].ToString() + "<br/><br/>"
+ "服务器的主机名、DNS地址或IP地址: " + Request.ServerVariables["Server_Name"].ToString() + "<br/><br/>"
+ "提出请求的方法比如GET、HEAD、POST等等: " + Request.ServerVariables["Request_Method"].ToString() + "<br/><br/>"
+ "如果接受请求的服务器端口为安全端口时,则为1,否则为0: " + Request.ServerVariables["Server_Port_Secure"].ToString() + "<br/><br/>"
+ "服务器使用的协议的名称和版本: " + Request.ServerVariables["Server_Protocol"].ToString() + "<br/><br/>"
+ "应答请求并运行网关的服务器软件的名称和版本: " + Request.ServerVariables["Server_Software"].ToString() + "<br/><br/>"
;
}
/// <summary>
/// 退出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtn_quit_Click(object sender, EventArgs e)
{
if (Request.Cookies["LoginUserInfo"] != null)
Request.Cookies["LoginUserInfo"].Expires = DateTime.Now.AddDays(-1);
System.Web.Security.FormsAuthentication.SignOut();
Session.Abandon();
Session.RemoveAll();
Session.Clear();
this.Response.Redirect("../Login.aspx");
this.Response.End();
}
}
}