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

The Archive Base Latest Questions

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

Is System.Web.HttpContext.Current.Session the same as System.Web.UI.Page.Session ?

  • 0

Is

System.Web.HttpContext.Current.Session

the same as

System.Web.UI.Page.Session

?

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

    They do indeed refer to the same instance, but if you look at the methods in Reflector, you can see that they behave a bit differently (in ways that are not likely to matter in most applications):

    • The call to Page.Session uses a
      cached HttpSessionState reference.
    • The Page method will throw if
      session state is not enabled, while
      HttpSessionState.Session just
      returns whatever is in the
      “AspSession” bucket of its Items
      collection.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

protected void Button2_Click(object sender, System.EventArgs e) //logout { if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated) { System.Web.HttpContext.Current.Session.Abandon(); // it
When a user logs in, my code sets a Session variable using System.Web.HttpContext.Current.Session[customer_ref] ,
System.Web.HttpContext.Current.Response.Cookies[ssocookies].Domain = System.Web.HttpContext.Current.Request.ServerVariables[SERVER_NAME].ToString().ToLower(); System.Web.HttpContext.Current.Response.Cookies[ssocookies].Value = tokenID.ToString(); System.Web.HttpContext.Current.Response.Cookies[ssocookies].Path = ~/; System.Web.HttpContext.Current.Response.Cookies[ssocookies].Expires = DateTime.Now.AddDays(7); Now what
Im running a long process using ProgressBox, and in that process im using System.Web.HttpContext.Current.Server.MapPath()
The System.Web.HttpContext.Current.User.Identity.Name is returning null. I am definitely logged in. How can this be
What is the difference between System.Web.Cache and HTTPContext.Curent.Cache? In which cases both are used?
So since System.Web & HttpContext isn't available in Silverlight is there a way to
I want to extend the System.Web.UI.Page-class with some extra stuff. In the ctor I
HttpContext.Current.Session object is null when application throws File does not exist. exception in Application_Error
Without routing, HttpContext.Current.Session is there so I know that the StateServer is working. When

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.