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

Vote:
 
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?
#227748
Sep 11, 2020 13:28
Vote:
 

Hi Francisco

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

#227749
Sep 11, 2020 15:29
Vote:
 

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);
       }
#227750
Sep 11, 2020 16:05
Vote:
 

Hi,

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

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

#227752
Sep 11, 2020 16:40
Vote:
 

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.

#227753
Sep 11, 2020 17:03
Vote:
 

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

#227754
Sep 11, 2020 18:27
Vote:
 

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=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode" />
</modules>

#227758
Sep 11, 2020 20:55
Vote:
 

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.

#227780
Sep 12, 2020 4:35
Vote:
 

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.

#227827
Sep 14, 2020 2:55
Vote:
 

Hi Vicent,

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

#227845
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.