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

  • SEARCH
  • Home
  • 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 3427276
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:49:00+00:00 2026-05-18T06:49:00+00:00

I am the administrator and I need to delete a user. If the user

  • 0

I am the administrator and I need to delete a user.

If the user is authenticated at the moment I delete it, what is the best strategy to force the deleted user to logout at the next request?

Must I handle this operation in the Application_AuthenticateRequest event?

In other words, can be an idea to verify in the AuthenticateRequest event if the user still exists and, if not, to delete all the cookies and redirect to logon page?

  • 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-18T06:49:01+00:00Added an answer on May 18, 2026 at 6:49 am

    After some research and evaluation, finally I have found a strategy to handle this scenario, so, in Global.asax:

    protected void Application_AuthenticateRequest()
    {
        var user = HttpContext.Current.User;
        if (user != null)
        {
            if (Membership.GetUser(user.Identity.Name, true) == null)
            {
                CookieHelper.Clear();
                Response.RedirectToRoute("Login");
            }
        }
    }
    

    When the request is authenticated, we verify that the user still exists in the system, if not all the cookies will be deleted and the request will be redirected to the login page.

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

Sidebar

Related Questions

I have a console application that require to use some code that need administrator
I need one of my .exe to always run as administrator without UAC prompt.
I need the Django Admin interface to accept administrator uploads of Excel files where
Why do I need to create Multiple SSPs in MOSS? My manager (sharepoint administrator)
My user is an Administrator (I see it in the configuration panel), the below
a vital folder marked as System was deleted from ePublisher, the back end (administrator
Possible Duplicate: How to force C# App to run as administrator on Windows 7
I need to run an install script as an administrator. I tried several things
I am developing a java project. This project need administrator privilege to execute some
I need to load some dynamic html when a user click on a link

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.