Solved

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

Posted on 2007-12-03
4
239 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
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Abu Hamdan earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
What is the data that you are trying to save ? sepecific to user ? or to all users ?
0
 

Author Comment

by:paulCardiff
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now