Sessions and 4.1

Posted by Community Admin on 03-Aug-2018 07:11

Sessions and 4.1

All Replies

Posted by Community Admin on 30-Apr-2011 00:00

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

Posted by Community Admin on 05-May-2011 00:00

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

Posted by Community Admin on 05-May-2011 00:00

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.

This thread is closed