Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Can i disable SessionState in PageControllerBase<T>

Vote:
 

Hi Team,

As of now, I am not using any Sessions in my application so i am planning to disable SessionState in Base controller level to improve the performance. Below is code which i am doing.

[SessionState(System.Web.SessionState.SessionStateBehavior.Disabled)]
public abstract class PageControllerBase<T> : PageController<T>
where T : SitePageData
{

}

So my question here is, If i disable session anything will break in CMS features? Is there any dependency with session across the CMS platform.

Thanks,

Suresh B

#226300
Aug 10, 2020 15:53
Vote:
 

Hi Suresh

Since you are applying the attribute to an attribute that only your custom controllers inherit from, then Episerver CMS will not be affected. The editor platform will still be able to use Session State as needed.

But have you tried disabling session state completely (from web.config)? From version 11.9, CMS is smart enough to store visitor group data in cookie state, when session state is disabled (documentated here).

#226302
Aug 10, 2020 17:01
Vote:
 

Hi Stefan,

Thanks for the update. It's clear for me now.

Thanks,

Suresh B

#226483
Aug 13, 2020 17:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.