Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5929387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:24:54+00:00 2026-05-22T14:24:54+00:00

I am building an ASP.NET MVC3 app using Forms Authentication and I’d like to

  • 0

I am building an ASP.NET MVC3 app using Forms Authentication and I’d like to log out all existing sessions for a user when that user logs in. I’m trying to prevent multiple people at different workstations from logging in and working under the same account.

Is there a standard way of handling this? Logging out the existing session is easy, but I haven’t come across a way to check for other sessions by the same account and log them out.

I have a few ideas on how to hack this, but I’m curious if there’s an established method for this using IIS or the FormsAuthentication API.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:24:55+00:00Added an answer on May 22, 2026 at 2:24 pm

    Because of the statelessness of the web, you can’t “log out” a session until they make their next request (for instance, session might be maintained in a cookie, which can’t be written on the client outside of the context of a request-response interaction).

    There is still a solution, which assumes you are using session state, and preferably you have a common base controller for all of your controllers requiring “Authentication”.

    Upon successful login, generate a token (a guid perhaps) and store that with the session. Also write this to a application-wide store (database or application context for instance) keyed by the userid.

    In the Base Controller (or otherwise you’d have to create an action filter) check the token in session against the token registered for the userid in the application-wide store. If they don’t match, log out the user using the standard SignOut() call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a new Asp.Net MVC3 solution and would like to have all the
I am building a project using ASP.Net 4 and MVC3 using C#. The ASP.Net
I'm building a simple multi-user (multi-tenant?) App with ASP.NET MVC3 and EF4, one database,
I'm building my first ASP.NET MVC 3 app and using jqGrid. One of my
We are building ASP.NET MVC3 web applications using Visual Studio, SQL Server 2008 R2
i am building a new web site using asp.net mvc3 web application ,, and
I´m building an asp.net app, which technology I should use to get AJAX capabilities?
I'm building an ASP.NET web application, and all of my strings are stored in
I'm am building my asp.net web application using MVC (Preview 5), and am also
I am building an ASP.NET MVC 3 app which will run in Azure. Everything

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.