Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Configurable signoff timeout.

Configurable signoff timeout.

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsecurityhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I have an ASP.NET app that uses forms authentication. I would like to be able to have a configurable expiration on the sign-on time so that after the timeout expires, the user will be signed out. I tried a couple different things, but am hoping that someone can give me some additional help. Here is what I have tried so far and the problems that I have faced: 1. Setting the timeout value in the web.config entry. The downside is that I have not figured out how to change the timeout value dynamically. I need this to be configurable by the administrator logon of the web page. 2. Setting Session.Timeout and then calling FormsAuthentication.SignOut() in the Global.asax Session_End() event. This does not seem to work. The user remains signed-on when I navigate back to the protected page.

    Z 1 Reply Last reply
    0
    • L Lost User

      I have an ASP.NET app that uses forms authentication. I would like to be able to have a configurable expiration on the sign-on time so that after the timeout expires, the user will be signed out. I tried a couple different things, but am hoping that someone can give me some additional help. Here is what I have tried so far and the problems that I have faced: 1. Setting the timeout value in the web.config entry. The downside is that I have not figured out how to change the timeout value dynamically. I need this to be configurable by the administrator logon of the web page. 2. Setting Session.Timeout and then calling FormsAuthentication.SignOut() in the Global.asax Session_End() event. This does not seem to work. The user remains signed-on when I navigate back to the protected page.

      Z Offline
      Z Offline
      ZimCoder
      wrote on last edited by
      #2

      Set the timeout value in your web.config file Set the timeout value in the session start method like this protected void Session_Start(Object sender, EventArgs e) { Session.Timeout = ConfigurationSettings.AppSettings["Timeout"]; } Try calling the FormsAuthentication.SignOut() method again in the Session_End method zimcoder What Democracy?? Jesus Christ is King and if you do not like... well you can go to hell!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups