EPiServer Archive

ImageVault 4 MediaStreamService URL exposed on EPiServer 7.5 website

I ran into a small ImageVault 4 configuration error setting up a new testing environment for a client’s EPiServer 7.5 website the other day; all of our ImageVault pubished media URLs had stopped working. Or, actually they worked just fine as long as you tried accessing them from the server. In all of our old environments the image URLs rendered correctly as below: While on …

Database persisted translations with edit tools for language file resources in globalized EPiServer websites

A few years back I wrote a small tool allowing web administrators to update EPiServer CMS 6 R2 language files by themselves without the help of their website developers. There were of course a few downsides to this, such as updated deployment procedures as not to lose any new translations. I took a few hours and made a new one for EPiServer 7.5 that works …

Updated sitemap.xml generator functionality with bundle and batch support using sitemapindex

I updated the previous sitemap.xml generator functionality with new support for sitemapindex with batching and bundling of different types of sitemap URLs. My current client has the need to manually add sitemap.xml entries as a supplement to the generated ones through an administrator interface; hence the bundling functionality. Source code at GitHub.

Sitemap.xml generator engine for Multi language EPiServer 7.5 websites

A sitemap.xml file is a useful tool for helping search engines to find relevant pages on your website. This sitemap generator engine for EPiServer is based on loose strategies supporting globalized multilingual content; in other words, mysite.se/sitemap.xml and mysite.no/sitemap.xml will return swedish and norwegian URLs respectively. The strategy based pattern allows for easy custom additions of any kind to the xml file; for instance, apart …

Automatically give visitors proper focus area on ImageVault 4 images on your EPiServer 7.5 websites

In my current project there is a client need to handle massive amounts of photographs and images in a simple manner. To keep all of them in one well organized place we decided to go with the latest ImageVault solution from Meriworks AB. To meet certain client specific needs we extended the existing functionality with a custom tool in EPiServer‘s edit mode. People involved in …

Custom property Checkbox wrapper as Dynamic Property in EPiServer 7.5

We needed to add a checkbox as a dynamic property in my current client’s EPiServer 7.5 site last week. It’s not as straight forward as one might think due to the way that dynamic properties are handled. If you add a dynamic checkbox property through admin mode, together with a property decorated with the attribute in your code, everything will work fine up until …

Rewrite URL before ValidateInputIfRequiredByConfig throws ‘A potentially dangerous Request.Path value was detected from the client (&).’ exception

A client are on their way to migrate a large website from an old platform to a brand new EPiServer 7.5 site running on an IIS webserver. We created a small redirection engine to handle all incoming legacy URLs redirecting them to the proper pages on the new website, so as not to lose search engine ranking, visitor bookmarks and so on. However, the legacy …

ELMAH dll or custom assembly with modules breaking ImageVault UI in EPiServer 7.5 website

Some time ago I ran into some problems getting Meriwork‘s ImageVault to function on an EPiServer 7.5 website together with the ELMAH logging tool. Today I experienced the same thing, but this time with my project’s own custom Core assembly; I thought that it might be useful to write a short note about it. The problem appears when either surfing to the ImageVault UI (for …

EPiServer 7.5 ArgumentException: Unable to find a module by assembly ‘{assembly}, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’

I ran into an ArgumentException setting up a custom plug-in decorated with the IFrameComponent attribute today; I wanted to have it appearing in the right hand area of the EPiServer edit mode. After setting up all views, models and so on, I got the following exception when I tried accessing the site. I fixed this problem by adding my assembly to the protectedModules section of …

Adding items to EPiServer’s global menu in edit/admin mode

We needed to create a custom toolbox in EPiServer‘s edit mode as a central place of keeping additional functionality for a client’s 7.5 website. The global menu seemed like an excellent place to do this. For a brief description on how to get EPiServer’s global menu on your own pages see this previous article. Here is a short note on how it can be done; …

EPiServer Search in Edit Mode does not work, or only works for page ids

We noticed that the edit mode EPiServer search did not function properly for a new website being developed for a client. What caused the issue was mainly two things; the EPiServer search not being set up properly (causing the message Content not found), and some missing handler mappings in the IIS making us only being able to search based on PageIds. Here is a short …

ContentLink ArgumentNullException while saving AccessControlList on EPiServer page created programmatically

I received a disturbing ArgumentNullException today while removing read access for the Everyone role on new pages created in codebehind. Not really difficult once you figure it out, but I thought I’d provide an example to show how it may be done. EPiServer ContentLink value cannot be null calling ACL.Save method At first glance it may seem as it is a good idea to take …

Notes about default property values in EPiServer 7.5

I needed to set default values for a couple of my EPiServer 7.5 block and page properties today, and found Per Mange Skuseth‘s article on Attribute-based default values. I really like Per’s way of dealing with them, as you get to have each default value in connection with the property that it will affect, rather than stoving them away in some obscure method override chunk …

EPiServer 7.5 throwing System.Data.SqlClient.SqlException (0x80131904): editSaveContentVersionData: The WorkContentId dosen´t exist (WorkContentID=0)

A short note on another EPiServer exception that I encountered today while trying to save a newly created EPiServer page programmatically from codebehind. The reason for it is rather self explaining looking back at it. It’s not possible to force the current version as it does not exist yet, Doh.. So just finding myself content with only doing what is neccessary fixed the problem right …

An alternate way of managing your tabs in EPiServer 7.5; adding and changing

I needed to add a few extra tabs to our EPiServer 7.5 installation last week, and found Per Magne Skuseth‘s comment on Tabs and sort index to be really useful. Of course I managed to alter the piece of code beyond recognition while integrating it into my current project’s architecture. Here is a StructureMap twist on adding and changing tabs. Easy way of adding and …

Notes on translating ContentType, Property, and Group names in EPiServer’s Edit Mode

I ran into a bit of trouble the other day trying to get my current project’s EPiServer installation to display proper translations from our custom language files for the PageType group names when creating new pages. Luckily EPiServer’s Kristoffer Sjöberg quickly helped me getting it sorted :) So, here are my notes on the matter. EPiServer language files This is what the EPiServer language file …

Using NLog with EPiServer and log4net

In my current EPiServer project we decided to use NLog for our logging needs rather than going with log4net. Since EPiServer has a dependency on the latter we wanted a way of bridging EPiServer’s log messages to our own NLog setup. This was accomplished by creating a new appender for log4net, redirecting all relevant log messages to it and converting them into something that NLog …

Security fix for the Language File Editor tool in EPiServer 7.5

I applied the security fix that I made for the EPiServer CMS 6 R2 version of the Language File Editor tool to the EPiServer 7 version that Hannu Hartikainen made earlier. Also did some code refactoring and removed the possibility for web administrators to create their own language files, as well as deleting existing ones; these were a source for potential headache. Code available at …

Security fix for the Language File Editor tool in EPiServer CMS 6 R2

In 2011 I wrote a tool allowing web administrators to edit EPiServer’s language XML files through admin mode. As the code was constructed it assumed that the environment was properly set up (i.e. securing the plugins preventing unauthorized access), thus trusting the user. Anyhow, failing to do so opened up for unauthorized users to read/modify/delete certain files on the server/shares. Here is a summary of …