Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/page/21

A blog about technology that catches my attention (Page 21)

It's a bit like a swap-file for my brain...

10 years, 335 posts and counting

Tripping over Liskov Substitution and search

When you're working with a "provider" model for services in your applications you get used to the assumption that everything follows the Liskov Substitution Principle and whatever provider you plug in will work in the same way. Unfortunately, for software our in the real world that's not always entirely true. Recently I came across an example of this which helped point out a bug in some search code in Sitecore...

Windows Server Essentials being difficult again...

The other day I realised that my home server hadn't sent me it's daily "Health Report" email. Having done the usual simple test of "is the server up?" and "what happens if I reboot it?", I ended up digging through the Event Log and Google to work out what was wrong. In case this happens to me again, or happens to you, here's what I found:

Be careful when you secure your HTTPS ciphers

One of the big things in IT security in recent times has been the successful attacks black-hats have launched against the infrastructure of cryptography. As we all come to rely on encrypted communications more and more, the vulnerabilities in old ciphers have become more of a problem to us developers and administrators. Vulnerabilities like Drown and Poodle are just two examples of a trend which means we all now have to worry about how our crypto is configured before we allow the internet to see a server.

But whenever you tie down security more tightly you risk causing problems when software relies on the thing you've just disabled...

I spent some time recently investigating why certain aspects of the Coveo for Sitecore search framework were broken on a client's server, and the answer ended up being directly related to crypto security. Here's what happened:

Coveo Sitecore ~5 min. read

(Re)Discovering Visual Studio Snippets

I've been using the built-in code snippets in Visual Studio for years, but for some reason until last week it had never crossed my mind to work out how to create my own. After getting bored writing the same chunk of code too often, I was reminded of the old saying "You should automate any task you have to do more than once". So I decided to have a go at some snippets. Turns out it's both a useful trick to know, and not hard to do:

Visual Studio ~3 min. read

Tests that cope gracefully with Airplane Mode

Have you ever needed to write code that detects if the current computer has an internet connection or not? Having recently tried this, it turns out it's not quite as easy as I expected it would be. So since I've banged my head against the challenge, here's one approach to solving the problem that you might find useful:

C# Unit Test ~2 min. read

The brave new world of Azure PaaS

With the release of Sitecore 8.2 Update 1 last week, we finally have support for running our Sitecore solutions as Azure Web App Services without the need for the Sitecore Azure Module. As someone who had never tried a PaaS deployment with the old module, this brings a load of interesting benefits, but also has a few challenges to get your head around. I've spent a bit of time experimenting, and discovered a few things that you might want to read up on before you dive in.

Azure Sitecore ~7 min. read

Even your 404s can be dangerous...

Every website needs to be able to deal with requests for pages which don't exist – some sort of 404 handling is a feature of pretty much every Sitecore project. But, as I discovered when sorting out an issue on a client's site recently, it's a bit of code which can bite if you're not careful...

Sitecore ~3 min. read

Putting your Windows user data on a different drive

The other week I mentioned I'd suffered a hard drive failure on my laptop. Other than the git issues I wrote about last time, I had another issue that seemed worth writing up: How to get all of the user data for the rebuilt install on a separate drive to the programs and operating system. If that's something you might want to do with a Windows install then read on...

Windows ~4 min. read

Banging my head against Git, Visual Studio 15 and SSL

Recently the hard drive in my trusty old laptop failed. Annoying, but ultimately it was just an excuse to go shopping, ignore most of my backup of the old machine and re-install all my programs from scratch. As part of that I decided that I'd try experimenting with the latest pre-release version of Visual Studio 15, to see if it was stable enough for me to use for my personal projects and blog coding now.

So having worked out how you re-install a "free upgrade from Win7" copy of Windows 10 and gone through through Visual Studio's new installer, I tried to clone some code from my private git server. Having been greeted with some cryptic errors, I've spent some time working out how to resolve the issue. So as ever, I'm writing it all down in case it's of help to others...

Visual Studio ~3 min. read

Getting pipelines from config

In my last post I was thinking about a more functional approach to defining pipelines, after having heard about some interesting new code that Sitecore had been working on. Since writing that I've had a few conversations where the topic "but what about if I want a pipeline to come from configuration?" has come up. I've been away from work for the last week doing my civic duty on Jury Service, but I've had some time in between court sessions that I've spent thinking about how last weeks ideas and configuration files might be combined.

So here's one way it could work:

C# Design Patterns ~5 min. read