Contact us

4 tips for migrating to Sitecore 8.2

May 16, 2017

I was recently given the challenge of migrating a Sitecore implementation from 6.5 to 8.2. I learned a few things along the way and I’d like to share them with you.

Tip #1: Try the Sitecore Express Migration Tool

Sitecore launched a migration tool that can help you migrate content. This tool is helpful – I would definitely recommend that you take a look at it.

Tip #2: Deal with the Global.asax on 8.2 issue

If you have any code running on "Global.asax" file, the method (Application_Start) will not fire on Sitecore 8.2.

Instead, you need to use some Sitecore pipelines to start that code.

In my particular situation, I had some MVC routes being defined on the Application_Start, so the solution was to implement an XML config patch to use a Sitecore pipeline to call the code.

In the sample below, I use the "Sitecore.Mvc.Pipelines.Loader.InitializeRoutes":

 

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">

  <sitecore>

    <pipelines>

      <initialize>

        <processor type="MyProject.Initialize.RegisterApiRoutes, MyProject " patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']" />

      </initialize>

    </pipelines>

  </sitecore>

</configuration>

Tip #3: Configuration changes for delivery servers

In order to properly configure a CD Server, you should be familiar with the Sitecore recommendations.

The major problem that I faced affected multiples pages. Here is the error message I saw:

{"Message":"An error has occurred.","ExceptionMessage":

"experienceAnalytics/api/logger","ExceptionType":

"System.InvalidOperationException","StackTrace":"   

at Sitecore.ExperienceAnalytics.Api.ApiContainer.CreateObject[T](String xpath)\r\n   at Sitecore.ExperienceAnalytics.Api.Http.Filters.NotFoundExceptionFilterAttribute..ctor()\r\n   at System.RuntimeTypeHandle.CreateCaInstance(RuntimeType type, IRuntimeMethodInfo ctor)\r\n   

at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)\r\n   

at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)\r\n   at System.Web.Http.Controllers.HttpControllerDescriptor.InvokeAttributesOnControllerType(HttpControllerDescriptor controllerDescriptor, Type type)\r\n   

at System.Web.Http.Controllers.HttpControllerDescriptor..ctor(HttpConfiguration configuration, String controllerName, Type controllerType)\r\n   at Sitecore.Services.Infrastructure.Web.Http.Dispatcher.NamespaceHttpControllerSelector.InitializeControllerDictionary()\r\n   

at System.Lazy`1.CreateValue()\r\n   at System.Lazy`1.LazyInitValue()\r\n   at Sitecore.Services.Infrastructure.Web.Http.Dispatcher.NamespaceHttpControllerSelector.FindMatchingController(String namespaceName, String controllerName)\r\n   

at Sitecore.Services.Infrastructure.Web.Http.Dispatcher.NamespaceHttpControllerSelector.SelectController(HttpRequestMessage request)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}

This error tells us that we missed one important step–some files must be disabled:

  • Sitecore.ExperienceAnalytics.dll
  • Sitecore.ExperienceAnalytics.Client.dll
  • Sitecore.ExperienceAnalytics.ReAggregation.dll

Tip #4: Framework Target

Don´t forget to update your Target Framework. If you forget to update it, you’ll experience multiple errors on your solution.

Some additional resources on migrating to 8.2 can be found here.

Contact us

Let's reinvent the future