Home Tags Privacy About

All posts tagged with "ASP.NET"

ASP.NET is Microsofts open source .Net Web framework. On newer versions of .Net this framework is cross platform and can run on both windows and linux.

Page 1 of 3 Older Posts →

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET 19 February 2023

ASP.NET - What is the difference between ConfigureServices and Configure?

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. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 17 September 2022

C# ASP.NET - How to download a file from an endpoint, with PDF, JPG and CSV example

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 06 September 2022

ASP.NET - How to make a controller endpoint for a HTTP Delete request

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 25 August 2022

C# - How to add request timings to an ASP.Net project

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET, C# 03 April 2022

Asp.net core - How to inject a dependency into a controller using standard dependency injection

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. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 20 January 2021

Asp.net core - What is the difference between AddTransient, AddSingleton and AddScoped?

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET, C# 18 January 2021

Asp.net core - how to set up a controller endpoint to receive XML instead of JSON

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET 28 November 2020

Asp.net websockets - sending messages back and forth between client and server

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 14 March 2020

Asp.net core - how to change the launch URL when working with asp.net projects

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET 07 March 2020
Page 1 of 3 Older Posts →
  • Rss
  • Twitter
  • LinkedIn
  • profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2025 Privacy policy