解决方案 »

  1.   

    获取的hcUser不是null,但里面的东西是空的。
      

  2.   

    都过期了
    Exipres的值是过去了
      

  3.   


     HttpCookie hcUser = new HttpCookie("GISUser");
                hcUser.Values.Add("username", Login1.UserName);
                hcUser.Values.Add("password", Login1.Password);
                hcUser.Expires = DateTime.Now.AddDays(30);
                hcUser.HttpOnly = false;
                hcUser.Path = "/";
                hcUser.Domain = "192.168.1.42";//"10.22.4.100";
                Response.Cookies.Add(hcUser);