Can Sitefinity run with enableSessionState set to true?
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
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