mongodbsessionsitecoresitecore8.1sitecore-fxm

Sitecore 8.1 error: "No session Id managers were found to manage the session Id for the current request"


I'm attempting to get a basic layout up and running in Sitecore 8.1, and I've hit an error about which I can find very little information. When attempting to view any page (even the backend interface or connecting from Sitecore Rocks), I get the message "No session Id managers were found to manage the session Id for the current request."

Some Googling suggests that this has to do with some issues with the out-of-box session provider and recommends swapping it out for keeping the sessions in Mongo. Sitecore's documentation provides a description of this, both for shared and private sessions. I've attempted to implement those but continue to receive the same error.

Here's my code as it stands now:

App_Config/Include/MongoSessionProvider.config

<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <tracking>
      <sharedSessionState>
        <providers>
          <clear/>
          <add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionProvider, Sitecore.SessionProvider.MongoDB" connectionString="session" pollingInterval="2" compression="true" sessionType="shared"/>
        </providers>
      </sharedSessionState>
    </tracking>
  </sitecore>
</configuration>

App_Config/Include/ConnectionStrings.config (excerpt)

<add name="session" connectionString="mongodb://localhost/sharedsession" />

Web.config (excerpt)

<sessionState mode="Custom" cookieless="false" timeout="20" sessionIDManagerType="Sitecore.FXM.SessionManagement.ConditionalSessionIdManager" customProvider="mongo">
  <providers>
    <add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider, Sitecore.SessionProvider.MongoDB" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" />
    <add name="mssql" type="Sitecore.SessionProvider.Sql.SqlSessionStateProvider, Sitecore.SessionProvider.Sql" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" />
  </providers>
</sessionState>

Note that this is on my local development machine. I have Mongo running (and confirmed its connection to Sitecore), and I created both the session and sharedsession databases in it using use session and use sharedsession, which I understand to be the way to create DBs in Mongo.

Am I missing something here? Or does the error simply not mean what I think it means?


Solution

  • In case it helps anyone else, we were running into this issue as well after upgrading to Sitecore 8.1 rev. 151003.

    In our particular case the issue was with a namespace change in this line in the Web.config:

    <sessionState mode="InProc" cookieless="false" timeout="20"
     sessionIDManagerType="Sitecore.FXM.SessionManagement.ConditionalSessionIdManager">
    

    That should be the following:

    <sessionState mode="InProc" cookieless="false" timeout="20"
     sessionIDManagerType="Sitecore.SessionManagement.ConditionalSessionIdManager">
    

    It might have been something we missed in the upgrade guide, but we finall found it after pulling down the a copy of Sitecore 8.1 rev. 151003.zip from the downloads page.