Coveo for Sitecore 5 is now available!

Sitecore 8.0 Session is not Initialized Exception

Symptoms

In Sitecore 8.0, you get an unhandled exception when calling one of the following four pages:

  • [Your Sitecore Instance]/sitecore%20modules/Web/Coveo/OAuth/AuthorizationLinkCallback.aspx
  • [Your Sitecore Instance]/sitecore%20modules/Web/Coveo/CoveoDiagnosticPackage.aspx
  • [Your Sitecore Instance]/sitecore%20modules/Web/Coveo/Admin/CoveoDiagnosticPage.aspx
  • [Your Sitecore Instance]/sitecore%20modules/Web/Coveo/Admin/SwitchToExpandedPermissions.aspx

The Exception Details state System.InvalidOperationException: session is not initialized.

Cause

A tag to prevent these pages from logging entries in xDB is not recognized.

Resolution

There are two solutions. You can edit the four files which contain the unrecognized tag or upgrade Coveo for Sitecore.

Removing the Unrecognized Tag from the Files

  1. Open all four files in a text editor and remove the EnableSessionState="false" tag.

    For instance, in the [Your Sitecore Instance]\Website\sitecore modules\Web\Coveo\OAuth\AuthorizationLinkCallback.aspx file, locate the following line:

     <%@ Language="C#" Inherits="Coveo.SearchProvider.Applications.OAuth.AuthorizationLinkCallback" CodeBehind="AuthorizationLinkCallback.aspx.cs" EnableSessionState="false" AutoEventWireup="True" %>
    
  2. Edit the line so it reads:

     <%@ Language="C#" Inherits="Coveo.SearchProvider.Applications.OAuth.AuthorizationLinkCallback" CodeBehind="AuthorizationLinkCallback.aspx.cs" AutoEventWireup="True" %>
    
  3. Save your changes.

Upgrading Coveo for Sitecore

As of the July 2018 version of Coveo for Sitecore 4.1, the issue is fixed.