Skip to content

Blog

Change the Name of the Hangfire Dashboard

Hangfire is a great tool to for background processing in .Net. We use it for all our projects, and it works without any problems.

There is only one bit of nitpicking we found: If you use Hangfire with multiple projects, it is a bit hard to keep the dashboards apart. By default, the tile reads "Hangfire Dashboard" in all of them:

How to Create a .gitignore File for .Net

When we start a new project, we best create a Git repository right away. The only problem when we do that from the command line is that we do not get a .gitignore file. Without such a file, Git will track all files in our repository – including *.exe, *.dll, *.pdp and many more that we do not want. We could go and find a .gitignore from a different project. But there is a better way for our .Net projects:

dotnet new gitignore

How to Fix the No X11 Display Error With Java Applications on Ubuntu 24.04 LTS

On my newly upgraded Ubuntu 24.04 LTS I got this error when I started a Java application:

Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY variable was set, or no headful library support was found, but this program performed an operation which requires it,

at java.desktop/sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:58) at foo.lj.a(Unknown Source) at foo.lj.(Unknown Source)

Little SQL Server Tricks: Rename Default Constraints

One would assume that renaming a default constraint should work the same way as renaming a primary key. For some unknown reason that was not the case as I had to fix the (dynamically generated) names of default constraints. The format that worked at last was this one:

exec sp_rename N'SCHEMA.NAME_OLD', N'NAME_NEW' , N'OBJECT';

Enforce the Current JavaScript File in ASP.NET

There is not much more annoying that fixing a bug in a JavaScript file and then find problems in production because the browsers of your users cached the old file. While the first reaction is to disable all caching, there is a better way in ASP.NET: append the file version to the JavaScript file name.