EPiServer.Personalization.VisitorGroups.Internal.VisitorGroupStateStorageHandler : There is no session state module configured.

Hi there,

I have recently implemented Redis in DXP, and we started getting a lot of this warning message:

EPiServer.Personalization.VisitorGroups.Internal.VisitorGroupStateStorageHandler : There is no session state module configured.

Do you know what is missing to be configured?
Sep 11, 2020 13:28

Hi Francisco

Did you disable Session State when setting up your Redis integration? Or did you use Redis as a session state provider?

Sep 11, 2020 15:29

By default, the http session object is used if the AspNet session state mode is not Off.

It can be changed explicitly by setting false the property EnableSession on the VisitorGroupOptions options.

       public void ConfigureContainer(ServiceConfigurationContext context)
          context.Services.Add<VisitorGroupOptions>((s) => new VisitorGroupOptions(), ServiceInstanceScope.Singleton); 
          context.Services.Configure<VisitorGroupOptions>(s => s.EnableSession = EnableSession); 
          context.Services.Add<IStateStorage>(s => new InMemoryStateStorage(), ServiceInstanceScope.Singleton);
Sep 11, 2020 16:05


I did not disable the session state. This is my configuration:

<sessionState mode="Custom" customProvider="SessionStateStore" cookieSameSite="None" timeout="60">
<add name="SessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" throwOnError="false" connectionString="Redis" />

Sep 11, 2020 16:40

Then you probably don't have the Session HTTP module running. It needs to be explicitly registered when running Redis session state in Azure.

Have a look at this GitHub issue on how to register it.

Sep 11, 2020 17:03

You can store your session state in-memory with Azure Cache for Redis.

Please have a look ASP.NET Session State Provider for Azure Cache for Redis

Sep 11, 2020 18:27

Hi Stefan,

I have the Session HTTP configured in my web.config file as follows:

<modules runAllManagedModulesForAllRequests="true">
   <remove name="Session" />
   <add name="Session" type="Microsoft.AspNet.SessionState.SessionStateModuleAsync, Microsoft.AspNet.SessionState.SessionStateModule, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode" />

Sep 11, 2020 20:55

I recall that Episerver relies on the SessionStateModule from the System.Net assembly.

Have a try with that one, replacing the new module you are using.

Sep 12, 2020 4:35

Hi Francisco

Can you confirm if you have any data persisted in your Redis? You mentioned you see a lot of this warning, just want to clarify if this is partially working or not working at all.

Sep 14, 2020 2:55

Hi Vicent,

Yes, Redis is persisting data correctly. We are using to store customer's products.

Sep 14, 2020 22:33
* 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.