lajyh
  • Posts: 1
  • Joined: 04/11/2008
Good morning,

I was wondering if someone could tell me the proper way to change my web forum so that the cookie will not expire for the users logging in. I've had a lot of complaints about having to log on each time. I've tried to tamper with the coding and set the expiration to 10000000, but that didn't seem to work. I'm at a loss. Is there a way to do it in admin mode via the GUI?

Thanks,
Brian
Sponsor
mddubs
  • Posts: 476
  • Joined: 07/08/2008
The default expiration is 30 minutes, you can change it in your web.config like this:

<system.web>
<authentication mode="Forms">
<forms timeout="40320"/>
</authentication>
</system.web>

40320 is 4 weeks in minutes. Just search Google for "4 weeks to minutes" or whatever.

If the authentication cookie is still expiring then my guess is it's a client issue. They may have some browser settings or tools that are deleting cookies periodically, or not keeping them at all.
UserPostedImage 
www.bunkerhollow.com  | www.careercomputing.com 
When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )
ddscart
  • Posts: 60
  • Joined: 01/10/2008
See both below, they are all you need.

http://forum.yetanotherf...tay-logged-in--help.aspx 

http://www.orcsweb.com/a...es/aspnetmachinekey.aspx 
www.ddscart.orgUserPostedImageddscart@ddscart.org
Disabled Dachshund Society of Georgia
stevedinaz
  • Posts: 5
  • Joined: 18/12/2008
Thanks to you both for the reply, So I need to edit the web.config file. I'm not sure how to do that, but I'll figure it out. Thanks for the links.

stevedinaz.
Chetan Bavarva
  • Posts: 19
  • Joined: 17/11/2016
javascript set cookie with expire time 30 seconds


	var date = new Date();
   date.setTime(date.getTime()+(30*1000));
   var expires = "; expires="+date.toGMTString();

   document.cookie = name+"="+value+expires+"; path=/";



Chetan Patel
Custom software company India 
iFour Technolab Pvt. Ltd
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved