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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:01:48+00:00 2026-05-17T00:01:48+00:00

Given this Global.asax.cs: using System; using System.Web; namespace Foo.Web { public class Global :

  • 0

Given this Global.asax.cs:

using System;
using System.Web;

namespace Foo.Web {
    public class Global : HttpApplication {
        private const string IntroductionPageShownSessionKey = "IntroductionPageShownSessionKey";

        protected void Application_AcquireRequestState(object sender, EventArgs e) {
            ShowIntroductionIfNotYetShown();
        }

        private void ShowIntroductionIfNotYetShown() {
            if (HttpContext.Current.Session != null) {
                var introductionPageShown = Convert.ToBoolean(Session[IntroductionPageShownSessionKey]);
                if (!introductionPageShown) {
                    if (Request.Path.EndsWith("/Introduction.aspx")) {
                        Session[IntroductionPageShownSessionKey] = true;
                    }
                    else {
                        Response.Redirect("~/Introduction.aspx" + Request.Url.Query);
                    }
                }
            }
        }
    }
}
  1. User hits webapp and is shown Introduction.aspx
  2. User continues using webapp for a few minutes (ASP.NET_SessionId: ublbhu45ji31e055ywqu0555)
  3. User falls idle (doesn’t perform any postbacks) for a few minutes
  4. User performs postback
  5. User is shown Introduction.aspx
  6. Second inspection of user’s ASP.NET_SessionId cookie still shows ublbhu45ji31e055ywqu0555

Why is the user shown Introduction.apsx the second time inside the same ASP.NET Session? I’m familiar w/ the risk in setting session variables just before a redirect in the same postback, but that doesn’t apply here, right?

  • 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-17T00:01:49+00:00Added an answer on May 17, 2026 at 12:01 am

    Keep in mind that the Session itself likely has a shorter lifetime than the session cookie being sent to the browser and the ID value set in that cookie. In fact, the browser can continue to submit an old session ID, and the server will accept it and create a new session from it, if the old was expired.

    The implications being two possibilities:
    1) The session is timing out due to the timeout config value (I know not the case in your particular instance)

    2) What we’ve figured out since in your case via the comments to this question: the AppDomain was shutting down or being recycled.

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

Sidebar

Related Questions

Possible Duplicate: const and global This code will produce error in c++ // Foo.cpp
Imagine in the Global.asax.cs file I had an instance class as a private field.
given this coffeescript data = Foo: B Foos: [ A, B ] Blah: Id:
Given this code, tableButton = new JButton(new ImageIcon(80F_FG2015.GIF)); how would I get that String
Given this source document: <?xml version=1.0 encoding=utf-8?> <config> <group name=global> <globals> <item grp=db prop=userid
Good day! I've the following ViewModel class I use for login form: using System.ComponentModel.DataAnnotations;
I have user global.asax and I have write this code in my ASP.NET application
I define routes in my global.asax, like this: routes.MapRoute( Default, {controller}/{action}/{id}, new { controller
I want to register controllers programatically in Global.asax.cs . with MvcContrib.Castle.WindsorControllerFactory private static IWindsorContainer
I'm using a configuration within the global.asax.cs to register the components but it looks

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.