Skip to content

2024

How to Start the HTTPS Port for Your ASP.NET MVC Application

When we run our ASP.NET application from the command line, we see that it only starts the HTTP port:

info: Microsoft.Hosting.Lifetime[14]       Now listening on: https://localhost:5155 info: Microsoft.Hosting.Lifetime[0]       Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0]       Hosting environment: Development info: Microsoft.Hosting.Lifetime[0]       Content root path: C:\Users\jg\source\repos\WebApplication1\WebApplication1

How to Await an Octopus Task in Azure DevOps

Many tasks for Octopus Deploy in Azure DevOps work asynchronously. What is great in fire-and-forget scenarios, can be a problem when we need to finish a task before we go to the next one.

We had many failing BDD tests right at the beginning of the test run. After a long and cumbersome debugging session, we found the source of the problem: Our tests started before Octopus deployed our release to the server. But how can we delay our pipeline enough until Octopus finishes its work?

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