Wednesday, March 26, 2014

Receiving 404 errors from the FileManager in EPiServer

Last week I had a customer contact me as they were not able to upload new files in the filemanager. Taking a closer look I saw that uploading new files or searching for files in the filemanager resulted in HTTP 404 not found errors.

The problem? It turns out the FileSummary.config did not exist in the location specified in episerver.config:
<virtualPath customFileSummary="~/Config/FileSummary.config">
So if you find yourself scratching your head, wondering why the filemanager is giving you HTTP 404 errors, check the location of your FileSummary.config file!

Friday, March 21, 2014

Writing for the NDC Magazine

Before christmas, I received a phone call from Programutvikling. They are the great minds behind the NDC conferences and the NDC Magazine (formerly known as The Developer). During this phone call they gave me an amazing opportunity to start writing for their magazine regularly, and of course I immediately said yes.

Following up on this phone call a few weeks later, I was told they also wanted me on the cover on the magazine, and if I was up for it: to write the editorial. How could I resist? Again, I said yes!

The magazine was published yesterday, if you haven't received the paper version, you can find it online here.

My article "Understanding programming paradigms" is the first article I've written that has been published, and I am very exited to see the endresult. I'd like to thank everyone who have been involved in making this possible, especially my proof readers: @hsulriksen, @ahenrichsen, @YngveNilsen and @clausasbjorn.

From now on I will be writing for the online version of the NDC Magazine. I'm already planning the topic of my next article and I'll give you a hint: It will be related to my NDC talk :)

Tuesday, March 18, 2014

Deploying a site that has been upgraded to EPiServer 7.6

When you upgrade a site to EPiServer 7.6 it might be a good idea to keep a close eye on what is happening during the upgrade.

Why?
Well, the upgrade makes some changes to your AppData folder, so your next one-click deployment will not work as expected (unless you've included the AppData folder in your deployment process, in which case: shame on you). EPiServer has described the "Changes to location of package contents when upgrading" and blogged about the new add-ons location, and it's a good idea to read these if you run into trouble.

I experienced this yesterday, I deployed a new version of the site I'm working on to test and the website crashed.

The errors I received were along the lines of:

System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.System.Collections.Generic.ICollection>.Add(KeyValuePair`2 keyValuePair)
   at EPiServer.Web.Mvc.Html.QuickNavigatorHtmlHelperExtensions.RenderEPiServerQuickNavigator(HtmlHelper htmlHelper, String partialViewName)

This is another error I received:

System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. ---> System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at EPiServer.Cms.Shell.CmsModuleViewModel..ctor(ShellModule module, IClientResourceService clientResourceService, IEnumerable`1 contentRepositoryDescriptors)
   at EPiServer.Cms.Shell.CmsModule.CreateViewModel(ModuleTable moduleTable, IClientResourceService clientResourceService)

So what was the problem? Well, the problem was that the code that was deployed had been upgraded to 7.6, but the neccessary changes needed to make 7.6 work had not been done on the test server.

What I did to fix this was:
  1. Delete the Modules and ModulesRepository folders in AppData on the test server
  2. Copy the Modules and ModulesRepository folders from the dev environment to the test server (the upgrade had been done on the dev environment, so we knew these folders were correct)
  3. Delete the following assemblies from the modulesbin folder on your site root: 
    • EPiServer.Shell.UI.dll
    • EPiServer.Cms.Shell.UI.dll
    • EPiServer.Cms.Shell.UI.Sources.dll.  If your site uses Commerce, you'll also have to delete these: EPiServer.Commerce.AddOns.UI.dll and EPiServer.Commerce.AddOns.Manager.dll
  4. Make sure the modules/_protected folder exists on your site root.
For more details, I recommend reading the readme.txt files for the upgrade:
EPiServer.Commerce.UI (for commerce sites)

Monday, March 3, 2014

I'm speaking at NDC Oslo 2014

I've been picked as a speaker for NDC Oslo 2014, and I just can't believe it! The topic is the same as at Booster, "The integrations we fear and how we can manage them", but this time I'm doing a full one-hour presentation instead of a lightning talk.

This is going to be an amazing experience, I'm very excited and halfway terrified at the same time!