locked
cookies in chrome?? RRS feed

  • Question

  • User-962670764 posted

    I found that trying to persist my users id using a session variable doesnt work when the user is taken to paypal and returns.  OK - so I set a cookie when the user is going to go to paypal. IE9 recognizes the cookie but Google chrome ignores it, ??But it has my webaddress listed in it's advanced settings. Is there something different with chrome? I aded the label to display the value of the cookie. IE shows it, Chrome is blank. After memberid is assigned I intentionally kill the cookie.

    if (!IsPostBack)
            {
               
                HttpCookie _userInfoCookies = Request.Cookies["UserID"];
                string  strcookie = "";
    
                if (_userInfoCookies != null)
                {
                    
    
                    strcookie = _userInfoCookies["UserID"];
                    memberid = Convert.ToInt32(strcookie);
                    lblTest.Text = "cookie: " + strcookie;
                    //HttpCookie _userInfoCookies = new HttpCookie("UserID");
                    //Adding Expire Time of cookies before existing cookies time
                    _userInfoCookies.Expires = DateTime.Now.AddDays(-1);
                    //Adding cookies to current web response
                    Response.Cookies.Add(_userInfoCookies);
    
    
    

    Thursday, January 10, 2013 7:50 AM

Answers

  • User-807313774 posted

    Thearotically there should not be any problem.  Can you try accessing your code from some other machine? Also try to access the webpage in safari browser see if it's showing the label. 

    If above tests shows the label text then there is some cookie related seeting in your chrome which needs to be changed. You will easily find that on google...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 15, 2013 8:02 AM