Reputation: 31
Cookies are not working with IE. The browser is set to allow cookies. It works fine in Firefox... and works fine in IE when I run it locally. But as soon as I publish, it breaks. It is used for a poll so a user cannot vote more than once. The following code runs once a user tries to vote:
if (Request.Cookies["Poll"] != null && Request.Cookies["Poll"].Value == "Voted")
{
// Display label
lblVoted.Visible= true;
}
else
{
// Update DB
// Add cookie
Response.Cookies["Poll"].Value = "Voted";
Response.Cookies["Poll"].Expires = DateTime.Now.AddDays(30);
}
Upvotes: 3
Views: 3427
Reputation: 57075
If your cookie is a 3rd party cookie (e.g. in a subframe from a different origin) then the setting of the cookie would likely be blocked by P3P). Click View > Web Page Privacy Policy to see if any cookies are blocked.
Upvotes: 1
Reputation: 2458
Maybe you have underscore in your local server name. Sometimes this can be an issue. Check http://www.enhanceie.com/ie/bugs.asp
Upvotes: 2