How to set up logging using Serilog in ASP.NET with or without dependency injection
The easiest way to setup serilog is to add the Nuget packages and then configure it in your program.cs or startup.cs file. In this »
The easiest way to setup serilog is to add the Nuget packages and then configure it in your program.cs or startup.cs file. In this »
In previous versions of .Net the standard was to have a startup.cs file which implemented two methods: * ConfigureServices: Which is responsible for configuring dependency injection. »
I have previously written a post on how to return HTML from an ASP.NET controller endpoint. In this post I will take a more general »
Like with HttpGet HttpPut or HttpPost attributes there is a respective attribute for the HTTP Delete Method - HttpDelete. You can add this attribute to get »
Today I wanted to set up server timings [https://www.w3.org/TR/server-timing/] for a project to see how easy it would be. I found »
Asp.net core has built in dependency injection. If you have a standard Asp.net core project you will find the method ConfigureServices in your startup. »
When you wish to use dependency injection in Asp.net core you have three choices for the lifetime scope of your dependency. The three choices are »
In a previous post I showed how you can send XML using the HttpClient in asp.net core, using the following code snippet: var httpClient = new »
My previous post on websockets on how to stream messages to a client [https://peterdaugaardrasmussen.com/2019/01/20/how-to-use-websockets-with-asp-net-core-with-an-example/] has become quite popular. I felt »
If you wish to change the URL that your browser is directed to, when starting your new asp.net project you need to change your launch »