Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Cookie not expires after given time.

Posted on 2011-10-28
1
Medium Priority
?
219 Views
Last Modified: 2012-05-12
I am working on asp.net web application and using cookies to store the data. I want to expire the cookie when the time of the expiration reached. Here i had given the time to expire is 6 minutes after now, but it never expires untill I close the browser.

HttpCookie CurrentUserCookie;
CurrentUserCookie = new HttpCookie("CurrentUser");
CurrentUserCookie.Expires = DateTime.Now.AddMinutes(6);
Response.Cookies.Add(CurrentUserCookie);

Please advice.
0
Comment
Question by:ziorinfo
1 Comment
 
LVL 7

Accepted Solution

by:
kovilpattiBalu earned 1000 total points
ID: 37043365
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Integration Management Part 2
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question