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

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

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

10 years, 323 posts and counting

Driving browsers: #1 The Browser

Because sometimes reinventing the wheel is fun!

I bumped into an issue recently where I needed to write some code to scrape a bit of HTML. The usual .Net approach of using an HttpClient didn't work here - the web site in question made use of some client-side JavaScript to generate mark-up at runtime. So I needed a different approach to fetch the resulting HTML. A while back I'd written some code to grab images of rendered HTML using the Chromium DevTools APIs, and I figured I could play a similar game here...

C# HTML Browsers ~4 min. read

Tripped up by boolean values in Rule-Based Config

I thought this just did string matching, but it seems not...

I wasted a few hours recently when I did something which seemed entirely reasonable with Rule-Based Config in Sitecore and it did not work the way I thought it would. Here's an explanation of what I did and what happened as a result, so you can avoid making the same mistake as me...

Adding UTM codes to RSS links in Sitecore

An nice little example of extending Sitecore's default RSS Feed implementation

There aren't that many places where RSS gets used these days (Shame! It's still good!), but that doesn't stop the occasional requirement for it coming up in projects. Recently I was having some discussions about how a client's site could offer RSS for their content which included custom UTM codes in the feed links. That's not too tricky to achieve with Sitecore, so here's an example of what you might do.

Sitecore RSS ~3 min. read

Bonus Chatter: SUGCON NA Agenda - what caught my eye

There's a lot of great content. What bits are going to help me the most?

I see the agenda for this year's SUGCON NA event is out now. While everyone will have their own interests, here's what's caught my eye in the agenda.

Sitecore SUGCON ~4 min. read

Configuring IIS Recycling in containers

If you don't have the UI, how do you do this?

I had another "things work differently in containers" moment recently. One of the fun points of changing the approach to your deployments is that sometimes you have to look differently at how some core configuration issues too. And this seems like an issue others will encounter too:

Getting process dumps on Azure AppServices

When you need the hardcore diagnostics

Some time back I did a load of work on performance diagnostic work on some poorly performing Sitecore websites. (Which was the basis of a talk I gave a few times) I've recently had to look at some similar issues - but the world has moved on. I now have Visual Studio 2022 as my diagnostic tool of choice, and the websites are commonly hosted in Azure PaaS web apps. So what do you have to do these days to diagnose likely places for your code to be stuck?

But Azure was broken yesterday! What changed?

It's not fun when you can't isolate a root cause for a problem

Some of the most frustrating issues in IT happen when a thing which was working fine stops, and you're sure you didn't change anything. Now that very few people host their own infrastructure, these issues can be compounded because change or problems might happen in the internals of a complex infrastructure system you have no control over. I got bitten by this recently, and while I have no answers I suspect this is worth writing up just because it may help other people to realise the problem you have is not always your fault...

Customising Statiq's generated sitemap

Adjusting the default behaviour

I noticed the other week that the sitemap file my blog was generating included the urls, but none of the other metadata that they can report. To be honest, I'm not sure if search engines pay much attention to this these days, but since the schema for the files includes other options I decided to see if I could add them.

C# Statiq ~3 min. read

Fixing a broken preview database

When the instructions you're given don't quite cut it...

A colleague pointed me at an interesting issue recently, where trying to switch the Sitecore Desktop to view a "preview" database for a Publishing Target on a client's website caused a crash. The reason for this appears to be an interesting issue it would be fairly easy for others to trip over, so this seemed a useful thing to write up:

Sitecore Errors ~3 min. read

Debugging the depths of MSBuild

How to find out what's really going on

Recently I found myself looking at a Visual Studio project where the build was not behaving in the way I expected. So I was forced to try a few debugging techniques to work out what was up. And in the process of trying to resolve the problem, I discovered an interesting tool to help with scenarios like this. So if you find yourself stuck with a misbehaving MSBuild script here are a couple of ideas: