public static void IsAdmin() { //查看是否为超级管理员 string Ip = HttpContext.Current.Request.UserHostAddress; //if (ConfigurationManager.AppSettings["ServerIP"].ToString() != Ip) //if (ConfigurationManager.AppSettings["ServerIP"].ToString().IndexOf(Ip) == -1) if (1 == 2) { HttpContext.Current.Response.Write("<script>alert('你没有权限进入本页操作!');history.go(-1);</script>"); HttpContext.Current.Response.End(); } if (!CommFun.HasReg()) { HttpContext.Current.Response.Write("软件未得到授权!请与开发商联系注册本系统。"); HttpContext.Current.Response.End(); } }