?
Solved

How do i expire a formsauthentication ticket cookie based on the life spam of a browser?

Posted on 2007-12-03
4
Medium Priority
?
266 Views
Last Modified: 2008-02-01
How do i expire a cookie based on the life spam of a browser? e.g. browser close = cookie expires.

I.e. i'm currently using
Dim fat As New FormsAuthenticationTicket(1, CustomerGUID, DateTime.Now, DateTime.Now.AddYears(1), false, "")

But the cookie still exists when the browser closes despite ispersits = false

Any ideas?

NB: I can't use the global.asax or custom Javascript

Open in new window

0
Comment
Question by:paulCardiff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Abu Hamdan earned 1500 total points
ID: 20394979
You should use sessions instead, since sessions will be abandon when the session is closed, but with cookies i dont think that you can capture the event when the explorer is closed, or the PC is turned off .. etc. So many possibilities.
0
 

Author Comment

by:paulCardiff
ID: 20394990
sesions not an option sorry as this is working accross multiple domains - any other suggestions? i.e. specifically why IsPersist isn't working ?
0
 
LVL 7

Expert Comment

by:Abu Hamdan
ID: 20395015
What is the data that you are trying to save ? sepecific to user ? or to all users ?
0
 

Author Comment

by:paulCardiff
ID: 20395157
Sorry this was a case of me over complicating a simple concept - problem solved i.e. i was creating my own cookie and not utilising GetAuthCookie.

Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

718 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