T
Thomas
Hello developers.
I have the following web.config section:
<authentication mode="Forms">
<forms slidingExpiration="true" loginUrl="~/Login.aspx" timeout="30" />
</authentication>
On my Login.aspx form, if login succeeds, I create FormsAuthenticationTicket
in code like this:
tkt = new FormsAuthenticationTicket(1, userName, DateTime.Now,
DateTime.Now.AddMinutes(30), false, "");
The question: how do I read the timeout value from the web.config
authentication/forms element so it does not have to be hardcoded? I was
looking among FormsAuthentication properties, but found nothing useful.
Thank you for any hints.
Thomas
I have the following web.config section:
<authentication mode="Forms">
<forms slidingExpiration="true" loginUrl="~/Login.aspx" timeout="30" />
</authentication>
On my Login.aspx form, if login succeeds, I create FormsAuthenticationTicket
in code like this:
tkt = new FormsAuthenticationTicket(1, userName, DateTime.Now,
DateTime.Now.AddMinutes(30), false, "");
The question: how do I read the timeout value from the web.config
authentication/forms element so it does not have to be hardcoded? I was
looking among FormsAuthentication properties, but found nothing useful.
Thank you for any hints.
Thomas