string dns = Request.ServerVariables("HTTP_HOST");
HttpCookie cookie = Request.Cookies[dns];
if(cookie.Values["UserLevelPur"].ToString()!="...")
{
    Response.Write("...");
    Response.End();
};

解决方案 »

  1.   

    出现错误 “System.Web.HttpRequest.ServerVariables”表示“属性”,此处应为“方法”
      

  2.   

    失误:P
    ==>ServerVariables["HTTP_HOST"];
      

  3.   

    谢谢!coldljy     
    string dns = Request.ServerVariables("HTTP_HOST");
    这句怎么改啊??
      

  4.   

    string dns = Request.ServerVariables("HTTP_HOST");改为:
    string dns = Request.ServerVariables["HTTP_HOST"];