More in this section

Forums / General Discussions / Sessions and 4.1

Sessions and 4.1

3 posts, 0 answered
  1. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    30 Apr 2011
    Link to this post
    I thought my sessions were working post 4.1, but I'm not positive. I'm setting session variables but the session seems to remain empty. I've added enableSessionState to the pages node of the web.config. I've also added the session module to the HttpModule.

    I don't think I had anything in the web.config before now. I didn't backup my web.config prior to upgrading to 4.1

    I'm trying to access the session in the Page_Load event.

    So is anyone else having session issues? Anybody have any suggestions?

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    05 May 2011
    Link to this post
    Hi Eric,

    I am not able to replicate an issue with the session. Here is a sample code that returns the object correctly


            protected void Page_Load(object sender, EventArgs e)
            {
                Session["FirstName"] = "MyFirstName";
                Session["LastName"] = "MyLastName";

            }

          void trigger_Click(object sender, EventArgs e)
            {
                var f = Session["FirstName"];
                var l = Session["LastName"];
            }


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    05 May 2011
    Link to this post
    Figured it out. The page now had output caching on, so even after loading values out of the session, it wasn't showing up on the page. Simple.
3 posts, 0 answered