View Single Post
  #1 (permalink)  
Old August 17th, 2009, 09:08 PM
chobo2 chobo2 is offline
Friend of Wrox
Join Date: Sep 2007
Location: , , .
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default How to add an expiry date to Membership cookie?


I want to make a remember me function for my site.

I believe if i use

FormsAuthentication.SetAuthCookie("userName", true);

this would do what I want right? But I want to make it a 2 week season not till they clear it what I believe this line would do.

I am not using any of the severside controls from since I am using mvc. Also even some of membership methods such as verify() and Create() I have made my own since they did not meet my needs.

I tried to grab the .ASPXAUTH but I don't know if changing the expiry date will do what I want. Or if it will even let me.