|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Accessing timeout property of formsauthenticationof using built in features, how do we access the timeout property? That is, in: FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, "userName", DateTime.Now, DateTime.Now.AddMinutes(XXXX), // value of time out property false, // Value of IsPersistent property String.Empty, FormsAuthentication.FormsCookiePath); How can I access in: <authentication mode="Forms"> <forms name="App1" loginUrl="~/AccessDenied.aspx" protection="None" timeout="60"/> </authentication> the timeout=60 property and set XXXX to 60 minutes? Yes, I could parse the web.config file, but I'm looking for a more elegant solution. Ideas anyone? Thanks, Eric |
|||||||||||||||||||||||