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 8310323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:25:11+00:00 2026-06-08T19:25:11+00:00

In ASP.NET MVC3, I can’t seem to override a session timeout. I have set

  • 0

In ASP.NET MVC3, I can’t seem to override a session timeout. I have set breakpoints at all the relevant server-side code points I can think of (controller actions and methods in globax.ax.cs) but nothing seems to get hit on session timeout.

I even applied an attribute as suggested here: (http://www.tyronedavisjr.com/2008/11/23/detecting-session-timeouts-using-a-aspnet-mvc-action-filter/) but even it was not hit when the session timed out. Surely the timeout must be session-side, but where?

Does anyone know what exactly happens when an ASP.NET MVC application has a session timeout?

  • 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-06-08T19:25:13+00:00Added an answer on June 8, 2026 at 7:25 pm

    What sessionState mode are you using? (<sessionState mode=" ... "> in web.config)

    You should be able to add the following method to your Global.asax.cs to override the default Session_End behaviour:

    protected void Session_OnEnd(object sender, EventArgs e)
    {
        // insert code here
    }
    

    Things to bear in mind:

    • The Session_OnEnd / Session_End event will only be called if the HttpSessionState.Mode property value is InProc (this is the default, so if you’ve not changed it in the web.config this should be fine). If you’ve changed it to StateServer or SQLServer, then the Session_OnEnd event in the Global.asax file is ignored.

    • The Session_OnEnd / Session_End event is called by the application when it abandons the session – not when you close the browser. You can manually trigger it by calling Session.Abandon

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

Sidebar

Related Questions

ASP.Net MVC3 is cool and all but I have this question more out of
Can I have different login URL for different ASP .NET MVC3 areas? e.g. I
I have tried everything, even uninstalling asp.net mvc3, and I can't get HandleError global
Hope you can help. In my ASP.net MVC3 app, all my controllers descend from
I'm trying to test my asp.net mvc3 custom membership provider. I can't seem to
I have a section in my ASP.NET MVC3 website where a user can click
how to load cascading dropdownlist each other asp.net mvc3? how can i do? i
In ASP.NET MVC3 I'm trying to set the css class that the validation error
With ASP .NET MVC3. In my controller I have this portion of code MasterMindDnetEntities
I have a ASP.NET MVC3 solution with 2 projects it in. Let's call it

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.