Dump Connector States 2019-09-15 in INRIVER Howdy! Wondered what’s lurking in your connector’s state in inRiver PMC? If not, now’s the time! Using the .NET API we can write a simple console application to query and display it. Unfortunately, retrieving all connectors using UtilityService is not available, that support was dropped for iPMC while it’s working for on-prem still. Something along the lines of the below would do the trick (the pretty table is optional): public class Program { private const string DateFormat = "yyyy-MM-dd HH:mm:ss"; public static void Main(string[] args) { var url = ConfigurationManager. ...
Minimal Mvc Admin Plugin 2019-09-08 in EPISERVER Hi there! I saw Dejan’s post on Episerver MVC admin plugins and though that I could just post a thinner version. This one builds on attribute routing and we shouldn’t have to register a route in an initialization module just for the plugin, which makes it more of a standalone unit. The init module is included in the source, but typically it resides in the global initalization and is usable by all controllers and plugins. ...
Bust Cache on Block Publish 2019-03-09 in EPISERVER Howdy! This week I wanted to cache a model quite hard in the object cache. The trouble was that the content that I used for building the model was blocks in a content area. When adding or removing blocks from the area we could bust the cache by adding a dependency to the generated content cache key. In our case that was the start page, so using IContentCacheKeyCreator and generating a key for ContentReference. ...
Get Content with Language Fallback 2019-02-21 in EPISERVER Howdy! Today is basically just a short gist I had to add as a workaround recently. So, when working with content in multiple languages in Episerver we have the option of configuring fallback languages. This is made by selecting Language options for a content page. This could be done on Root level or further down in the hierarchy. Typically, a “lesser” language should present a default language fallback version of content if a translated version doesn’t exist. ...
Override Displayed Username in Episerver backend 2018-08-02 in EPISERVEROIDCOWIN Howdy! When implementing authentication via Open ID connect and OWIN, I ran into some issues with how Episerver (and I) handled usernames and user ids. Some background as to why Some features rely on IIdentity.Name to be the user name (presentable and pretty) while others rely on it being an immutable key. The latter is the case when using the Commerce PrincipalExtensions like GetCurrentContact() for example. Behind the scenes GetCurrentContact() uses the MapUserKey method for resolving the serialized user id key persisted on the ContactEntity in BusinessFoundation. ...
Upgrading - Error in ContentFactoryInitialization 2018-05-16 in EPISERVER Howdy! This week I have been upgrading an older Episerver site from CMS 7.15 to latest and greatest. Before the actual upgrade work began (or even estimated/pitched to the client) we had dived into the internals of the application to make sure that we didn’t have any big customizations or hacks potentially breaking the upgrade path. The approach used was upgrading to the latest version in each major version, resolving breaking changes and addressing any usages of APIs marked as obsolete. ...
Oh God Where Am I? 2018-05-07 in EPISERVER Hi there! I’m a poor little Episerver block and I’ve lost my parent, can you help me? It is another block and for some reason I can’t do without it. So the problem here is basically, how do I get the parent block of another block in the block controller/rendering context? Think e.g. a banner block nested within a carousel block’s content area. It’s probably better to rethink the model and isolate the block from its parent element and not have dependencies the wrong way. ...
Hello World 2018-05-06 in MISC Hi there! This is my first post ever (yay!) on my new micro blog. Future posts will be focused on Episerver, inRiver PIM and other C# related projects/issues. The site itself is generated with Hugo for now - very smooth I must say. We’ll see about the frequency of posts but I wouldn’t sit there repeatedly hitting F5. :-) Stay tuned though!