Can Sitefinity run with enableSessionState set to true?

Posted by Community Admin on 03-Aug-2018 20:08

Can Sitefinity run with enableSessionState set to true?

All Replies

Posted by Community Admin on 16-Feb-2011 00:00

I have a custom user control that utilizes the Session scope variables. When I included the user control into a page, it threw that familiar exception:

"Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration."

Is it ok for me to enable session state? Will it affect Sitefinity in any way? Is there a more preferred way for me to persist user control variables through a page refresh?

Thank you,
Dan Sorensen
Web Developer
ESD 112

Posted by Community Admin on 16-Feb-2011 00:00

Hello Dan,

There are properties for each page that allows you to enable the session. You can also use cookies or query string to pass the data when you make a refresh or you want to communicate with anther control.

Best wishes,
Ivan Dimitrov
the Telerik team

This thread is closed