Configuration file changes upgrading from EPiServer 7.0 to 7.5

All is set. You got the final go from your client to move their site from EPiServer 7.0 to 7.5, and from here on it should be a walk in the park. Coffee is brewed, installation packages and VPP migration tools downloaded, extracted and at the ready. The EPiServer’s Deployment Center upgrade process finishes without a hitch, and you run off to Visual Studio hitting the build button. And then nothing works. In all the excitement it seems as though you forgot about configuration file transformations; doh..

It’s an easy thing to do, and if you have no idea of what was actually done to your config files there are not many options; you could roll back the upgrade and try again, study EPiServer’s install files trying to find out what was done, or in some other way attempting to restore the overwritten configuration changes. If you choose to fix it yourself, I’ve compiled a list of changes to look for, with the hopes that it might remove some of the headache.

EPiServer 7.0 to 7.5 upgrade changes in EPiServerFramework.config

In EPiServerFramework.config there are several things that has been removed. For instance, the whole siteHostMappings section (lines 4-9) as well as the automaticSiteMapping one (10-12).

<episerver.framework>
  <scanAssembly forceBinFolderScan="true" />
  <siteHostMapping>
    <siteHosts siteId="MyProject">
      <add name="*" language="en" />
      <add name="localhost:7711" />
    </siteHosts>
  </siteHostMapping>
  <automaticSiteMapping>
    <add key="/LM/W3SVC/16/ROOT:UNIQUORN" siteId="MyProject" />
  </automaticSiteMapping>

Also the parts handling virtual paths to App_Themes_Default, UI, UtilFiles and WebServiceFiles are gone from here.

<add virtualPath="~/App_Themes/Default/"
  physicalPath="C:\{..}\7.0.586.1\application\App_Themes\Default"
  useRouting="true"
  name="App_Themes_Default"
  type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />
<add virtualPath="~/EPiServer/CMS/"
  physicalPath="C:\{..}\7.0.586.1\application\UI\CMS"
  name="UI"
  type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />
<add virtualPath="~/Util/"
  physicalPath="C:\{..}\7.0.586.1\application\util"
  name="UtilFiles"
  type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />
<add virtualPath="~/WebServices/"
  physicalPath="C:\{..}\7.0.586.1\application\webservices"
  name="WebServiceFiles"
  type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />

Lastly, a slight path change to the geolocation database file from MaxMind.

<geolocation defaultProvider="maxmind">
  <providers>
    <add databaseFileName="C:\{..}\EPiServer\Framework\7.0.859.1\Geolocation\GeoLiteCity.dat" ..
<!-- becomes -->
    <add databaseFileName="C:\{..}\EPiServer\Framework\7.5.394.2\Geolocation\GeoLiteCity.dat" ..

EPiServer 7.0 to 7.5 upgrade changes in episerver.config

In episerver.config there is an applicationSettings section with a whole bunch of attributes inserted as below.

<episerver xmlns="http://EPiServer.Configuration.EPiServerSection">
  <applicationSettings httpCacheability="Public"
    httpCacheVaryByCustom="path"
    httpCacheVaryByParams="id,epslanguage"
    pageFolderVirtualPathProvider="SitePageFiles"
    pageValidateTemplate="false"
    uiShowGlobalizationUserInterface="true"
    urlRebaseKind="ToRootRelative"
    uiUrl="~/EPiServer/CMS/"
    utilUrl="~/util/"
    uiEditorCssPaths="~/Static/css/Editor.css"
    uiSafeHtmlTags="b,i,u,br,em,strong,p,a,img,ol,ul,li"
    enableXmlRpcHeader="true" />

And the sites section that has been with us for so long is no longer there. Some of it has been moved to the section above, and some of it to the database.

<sites>
  <site siteId="MyProject"
        description="This is my project">
    <siteSettings
            httpCacheability="Public"
            httpCacheVaryByCustom="path"
            httpCacheVaryByParams="id,epslanguage"
            pageFolderVirtualPathProvider="SitePageFiles"
            pageRootId="1"
            pageStartId="4"
            pageValidateTemplate="false"
            pageWastebasketId="2"
            globalBlockFolderId="3"
            siteBlockFolderId="3"
            uiShowGlobalizationUserInterface="true"
            urlRebaseKind="ToRootRelative"
            siteDisplayName="MyProject"
            siteUrl="http://localhost:7711/"
            uiUrl="~/EPiServer/CMS/"
            utilUrl="~/util/"
            uiEditorCssPaths="~/Static/css/Editor.css"
            uiSafeHtmlTags="b,i,u,br,em,strong,p,a,img,ol,ul,li"
            enableXmlRpcHeader="true" />
  </site>
</sites>

EPiServer 7.0 to 7.5 upgrade changes in Web.config

Changes to the Web.config file is somewhat more extensive than the ones to the other configuration files. It starts from the top with the type attribute of the section tag, as well as a new section for EPiServer’s indexing service.

<section name="episerver"
  type="EPiServer.Configuration.EPiServerSection, EPiServer.Configuration, Version=7.0.586.1, Culture=neutral, PublicKeyToken=8fe83dea738b45b7"
<!-- Becomes -->
  type="EPiServer.Configuration.EPiServerSection, EPiServer.Configuration, Version=7.5.394.2, Culture=neutral, PublicKeyToken=8fe83dea738b45b7"
<section name="episerver.search.indexingservice"
  type="EPiServer.Search.IndexingService.Configuration .IndexingServiceSection, EPiServer.Search.IndexingService" />

After this, there are a whole bunch of updated bindingRedirects being changed to point to the newer version. For instance..

<assemblyIdentity name="EPiServer.ApplicationModules"
                  publicKeyToken="8fe83dea738b45b7"
                  culture="neutral" />
  <bindingRedirect oldVersion="1.0.0.0-7.0.859.16"
                   newVersion="7.0.859.16" />
<!-- Becomes -->
  <bindingRedirect oldVersion="6.0.0.0-7.65535.65535.65535"
                   newVersion="7.5.394.2" />

Assembly binding redirects that I found to be updated or added are: EPiServer.ApplicationModules, EPiServer.Data.Cache, EPiServer.Data, EPiServer.Events, EPiServer.Framework, EPiServer.Licensing, EPiServer.Shell, EPiServer.BaseLibrary, EPiServer.Configuration, EPiServer, EPiServer.Enterprise, EPiServer.ImageLibrary, EPiServer.Implementation, EPiServer.LinkAnalyzer, EPiServer.UI, EPiServer.Web.WebControls, EPiServer.WorkflowFoundation, EPiServer.XForms, Castle.Core, Castle.Windsor, log4net, Newtonsoft.Json, StructureMap,System.ComponentModel.Composition, System.Web.Extensions, System.Web.DataVisualization, and of course the new EPiServer.Search.IndexingService

Removed assembly binding redirects are: EPiServer.Blog, EPiServer.Scheduler, EPiServer.Scheduler.WKTL, EPiServer.WebDav, EPiServer.WebParts and EPiServer.XmlRpc.

A new namespace is added to pages/namespaces, a new web HTTP binding called IndexingServiceCustomBinding and a serviceHostingEnvironment node.

    <add namespace="System.Web.WebPages" />
  </namespaces>
</pages>
<webHttpBinding>
    <binding name="IndexingServiceCustomBinding"
             maxBufferPoolSize="1073741824"
             maxReceivedMessageSize="2147483647"
             maxBufferSize="2147483647">
      <readerQuotas maxStringContentLength="10000000" />
    </binding>
  </webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
                           multipleSiteBindingsEnabled="true" />

A new default indexing service for episerver.search is added and the search is activated if it wasn’t before.

<episerver.search active="true">
  <namedIndexingServices defaultService="serviceName">
    <services>
      <add name="serviceName"
           baseUri="http://localhost:7711/IndexingService/IndexingService.svc"
           accessKey="local" />

And finally, you get the whole new episerver.search.indexingservice configuration section which was registered at the top of the web.config file before.

  <episerver.search.indexingservice>
    <clients>
      <add name="local"
           description="local"
           allowLocal="true"
           readonly="false" />
    </clients>
    <namedIndexes defaultIndex="default">
      <indexes>
        <add name="default"
             directoryPath="D:\Projekt\MyProject\VPP\Index"
             readonly="false" />
      </indexes>
    </namedIndexes>
    </episerver.search.indexingservice>
    <location path="IndexingService/IndexingService.svc">
    <system.web>
      <httpRuntime maxQueryStringLength="65536" />
    </system.web>
    <system.webServer>
      <security>
        <requestFiltering>
          <requestLimits maxQueryString="65536" />
        </requestFiltering>
      </security>
    </system.webServer>
  </location>
</configuration>