Results 1 to 8 of 8

Thread: why is cookie still working when browser has cookies disabled?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    why is cookie still working when browser has cookies disabled?

    It's weird, my firefox has cookies disabled, yet I am still able to retrieve the cookie.
    Code:
    protected void Page_Load(object sender, EventArgs e)
            {
                Response.Cookies["a"].Value = "1";
              
            }
    
            protected void Button1_Click(object sender, EventArgs e)
            {
                Label1.Text = Request.Cookies["a"].Value.ToString();  //it returns value 1
               
            }
    Why is this?

  2. #2
    Hyperactive Member koolprasad2003's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    443

    Re: why is cookie still working when browser has cookies disabled?

    have you disabled your cookies like this ?
    MCP, MCTS, Microsoft MVP [Asp.Net/IIS]

    For more .NET development tips visit .NET Tips

    If the post is useful then please Rate it

  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: why is cookie still working when browser has cookies disabled?

    Check your cookies enabled or using this one

    Code:
    If Request.Browser.Cookies = True Then
       '... Cookies Enabled
    End If
    Please mark you thread resolved using the Thread Tools as shown

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: why is cookie still working when browser has cookies disabled?

    koolprasad2003: I checked that site, and that is exactly what I did, and my web app is still able to get that value from the cookie.

    danasegarane: It is returning true for me. I also checked the Session.CookieMode, and that returns "UseCookies".

    FYI: I tried to log on to Yahoo!Mail, and that gave me a message saying that it can't log me on because cookies was disabled. So the browser is disabled, but my webapp is allowing it. Do i need to make web.config setting changes?

  5. #5
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: why is cookie still working when browser has cookies disabled?

    Quote Originally Posted by benmartin101 View Post
    koolprasad2003: I checked that site, and that is exactly what I did, and my web app is still able to get that value from the cookie.

    danasegarane: It is returning true for me. I also checked the Session.CookieMode, and that returns "UseCookies".

    FYI: I tried to log on to Yahoo!Mail, and that gave me a message saying that it can't log me on because cookies was disabled. So the browser is disabled, but my webapp is allowing it. Do i need to make web.config setting changes?

    Did you used firefox to access the mail or automation ?
    Please mark you thread resolved using the Thread Tools as shown

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: why is cookie still working when browser has cookies disabled?

    Are you debugging straight out of Visual Studio, or are you deploying to IIS first?

    Gary

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: why is cookie still working when browser has cookies disabled?

    danasegarane:I access the yahoo email through firefox.

    Gep13: I tried both ways, and the same result.

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: why is cookie still working when browser has cookies disabled?

    Does the same thing happen in Chrome/IE?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width