Results 1 to 2 of 2

Thread: FormAuthentication Signout when browser close

  1. #1

    Thread Starter
    Fanatic Member VBKNIGHT's Avatar
    Join Date
    Oct 2000
    Location
    Port25
    Posts
    619

    FormAuthentication Signout when browser close

    How can I signout FormAuthentication when browser or tab close?

    using MVC 4 c#.

    If a post has helped you then Please Rate it!

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Re: FormAuthentication Signout when browser close

    You can try to use body.onblur event and do a location.href = '/account/logoff' (but it will not work 100%). Also you can specify a small timeout in your web.config (default is 30 minutes).
    Code:
    <authentication mode="Forms">
          <forms loginUrl="~/Account/LogOn" timeout="5"/>
        </authentication>

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width