Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Role based Form Authentication TimeoutRole based Form Authentication Timeout
Previous
 
Next
New Post
11/10/2006 9:52 AM
 

Hope you guys can help.

I have a situation where a client wants an overall authentication timeout of 10 minutes, but only certain users will have an extended timelimit.  I already have a tool that redirects users in certain roles to their homepage (another tab) upon login. Therefore I have already isolated the users that I want to extend the timeout on.

What I need is to grab the authentication cookie responsible for the timeout logoff and quickly change the authentation timeout.  I know it is a quick three to four lines of code, but I am hitting a wall right now.

Thanks in advance.

 
New Post
11/10/2006 1:13 PM
 

I decided to try again and an hour later I figured it out myself.  And like I thought it only took three lines.

Dim initialDotNetNukeTicket As FormsAuthenticationTicket = FormsAuthentication.Decrypt(Context.Request.Cookies(FormsAuthentication.FormsCookieName).Value)

Dim customDotNetNukeTicket As New FormsAuthenticationTicket(initialDotNetNukeTicket.Version, initialDotNetNukeTicket.Name, initialDotNetNukeTicket.IssueDate, initialDotNetNukeTicket.Expiration.AddHours(24), initialDotNetNukeTicket.IsPersistent, initialDotNetNukeTicket.UserData, initialDotNetNukeTicket.CookiePath)

Response.Cookies(FormsAuthentication.FormsCookieName).Value = FormsAuthentication.Encrypt(customDotNetNukeTicket)

If there is an easier way I would love to hear it.  Thanks

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Role based Form Authentication TimeoutRole based Form Authentication Timeout


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out