Mark Everard

Hello, I'm Mark – a PhD physicist turned technologist / architect.

Archive for June, 2014

Find(ing) missing dependencies when installing New EPiServer Find

without comments

Recently we installed the New EPiServer Find so our editors could benefit from the sleek new interface from which they could view and optimise our user’s search journeys.

Installation on our DEV machines was simple and performed through Nuget. However, after deployment we noticed that our upstream environments were broken (obviously we didn’t deploy as far as production!)

The environments were throwing the following exception on Initialisation.

The system cannot find the file specified.
at EPiServer.Find.UI.FindInitializationModule.Initialize(InitializationEngine context)

The cause

The EPiServer Find.UI is dependent on the following libraries

  • Newtonsoft.Json.dll
  • System.Net.Http.dll
  • System.Net.Http.Formatting.dll
  • System.Net.Http.WebRequest.dll
  • System.Web.Http.dll
  • System.Web.Http.WebHost.dll

These libraries are a part of MVC4 / WebAPI. I’m guessing that the Find UI uses WebAPI for delivering some of its goodness.

A solution is detailed here, but in summary you have two choices:

  1. The wrong way– Install MVC4 on your build server / target environments. The MVC4 installer will add these libraries to the GAC, so your application will be able to resolve them.
  2. The right wayInclude these dependencies as part of your application using Nuget. Install the Microsoft.AspNet.WebApi.WebHost package.

The right way means that your application is portable and is not dependent on system components being deployed on each server environment. Additionally the EPiServer.Find.Nuget package should explicitly list Microsoft.AspNet.WebApi.WebHost as a dependency. Put it on the backlog please Find team :)

Happy Finding!

Written by mark

June 26th, 2014 at 9:54 am

Posted in ASP.NET,EPiServer

PageStructureBuilder for EPiServer 7.5

without comments

If there was an award for the best EPiServer extension produced by a member of the World community; that didn’t gain the recognition it deserved. Of course, my own Personalisation Engine would win hands down 😉

Coming in a very close second would be one of Joel Abrahamsson’s masterpieces. This one lesser known than PageTypeBuilder, Truffler or PowerSlice, but one that solves a common CMS challenge equally as elegantly.

PageStructureBuilder was a solution Joel put together to automatically organise EPiServer pages, meaning you could define areas of your site that would ensure its content was arranged into a predefined structure. The obviously use-case here being ‘news’ type pages that would be stored in a date hierarchy (Year > Month > Day > News Article).

The solution was originally built against CMS6 and PageTypeBuilder, so I’ve forked Joel’s original solution and upgraded it to work against EPiServer 7.5 and the native strongly typed page implementation.

Available on EPiServer Nuget now.

 

Written by mark

June 10th, 2014 at 10:00 am

Posted in Community,EPiServer