Bug 37184 - Forms authentication cookie timeout is 50 years. Timeout value is not used
Summary: Forms authentication cookie timeout is 50 years. Timeout value is not used
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web ()
Version: 4.2.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Alex Rønne Petersen
URL:
Depends on:
Blocks:
 
Reported: 2015-12-21 10:13 UTC by eetasoft
Modified: 2016-01-13 05:22 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description eetasoft 2015-12-21 10:13:02 UTC
In Mono 4.2.2 using forms authentication with persistent cookie, cookie lifetime is set always to 50 years in line

https://github.com/mono/mono/blob/mono-4.2.2.10/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs#L217

According to 

http://blogs.msdn.com/b/dansellers/archive/2006/02/15/532359.aspx

starting at .NET 2.0 timeout element value must used for this.
Quote:

This means that in ASP.NET 2.0 the timeout value of both persistent and session based cookies are controlled by the timeout attribute on the <forms/> element.  This also applies if you migrate an ASP.NET 1.1 application to ASP.NET 2.0 then you can expect your persistent cookies to be reduced from 50 years to 30 minutes unless you increase the value in the timeout attribute.
Comment 1 Alex Rønne Petersen 2016-01-13 05:22:00 UTC
This should be fixed on Mono master.