Dependency Injection

Episerver ContentArea with AllowedTypes Specified by Interface

Background Once an interesting question was asked on Episerver Community Slack space how to work with ContentAreas and specifically [AllowedTypes] and specify restrictions based on interface. My answer wasn't quite helpful there and also I'm quite passionate about looking into the foreign code and understanding how platform is built - so I decided to write up a bit expanded version of the answer. According to aforementioned question you might have for example page type with following ContentArea definition (based on AlloyTech sample site): [ContentType(GUID = "19671657-B684-4D95-A61F-8DD4FE60D559")] public class…

Keep reading

How Risky are EPiServer.DeveloperTools on Production Environment?

We had a great conversation at the EPiServer Partner Close-Up conference with one and only Allan Thræn about future plans and such. And one of the topics we chatted about was that in our opinion no one really knows whether "EPiServer.DeveloperTools" package is safe to install to production environment or not. Will it do any harm? It's great for local development and probably staging also. But what about production? What exactly the package does, what it intercepts, mimics or changes in the running code?! Therefore I thought…

Keep reading

Fix Logging in Azure Functions when Reusing Your Component

There are cases when your project follows hype and you face the case when you need to reuse your component in serverless world. This blog post is about how to fix logging (I picked Common.Logging, but actual implementation does not matter) when reusing some of your components in Azure Functions. Existing Component Most of the time I see that transition to functions or serverless computing is not done by rewriting component that does black magic and delivers business logic, but instead - just referencing it and invoking from function.…

Keep reading

Content Area - Under the Hood, Part 3

This is last blog post in series under the hood of Content Area. In this blog post we will take a look at how and what exactly could be customizable while content area is being rendered. Where and how developer can hook in, what can be overridden and controlled. Parts in this series: – Part 1: Registration and Discovery – Part 2: Template Selection – Part 3: Extensibility Overview Following parts and pieces can be customizable, changeable or replaced by other code completely: Change renderer - It's possible to change they guy who…

Keep reading

Format Your Exception Message Properly

Not so Nice Failure I was hacking around NServiceBus (NSB) application and came across pretty unpleasant failure from NSB. So in short we were using Unicast bus that basically means that producer-side of the message has to have a configuration set to which NSB endpoint particular message should be sent. In this case we were using Microsoft Azure Storage Queues as physical transport level. In case when you don’t have a particular configuration to instruct NSB where the message has to be delivered you may encounter following exceptional message:…

Keep reading