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?
Re: why is cookie still working when browser has cookies disabled?
have you disabled your cookies like this ?
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
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?
Re: why is cookie still working when browser has cookies disabled?
Quote:
Originally Posted by
benmartin101
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 ?
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
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.
Re: why is cookie still working when browser has cookies disabled?
Does the same thing happen in Chrome/IE?