Spike: ASP.NET Core Web API¶
- Author: Ethaniel
- Date: 2026-11-25
- Timebox: 30 minutes
- Why this timebox: the same duration as the FastAPI spike, so the two results can be compared.
- Time actually spent: 8 minutes, then I stopped on purpose (see below).
- Setup: .NET SDK 10.0.115, installed before the timebox started.
- Prior experience: none with ASP.NET Core or C#.
Where I was when the time ran out¶
- Server on port 8080
-
GET /pinganswers{"status":"ok"} - Port read from the
PORTenvironment variable - OpenAPI page served (bonus)
- OAuth login (bonus)
I stopped while reading the documentation, before writing any code.
What took the most time¶
- Reading the Microsoft documentation. I found it hard to read and unpleasant to follow. It does not really explain the commands, and many points stayed unclear. Getting started would have meant digging much deeper than the time allowed.
- Learning a new stack. Unlike FastAPI, I had never used C# or ASP.NET Core, so the spike meant learning a language and a framework from scratch, not just a framework.
What it would take to go further¶
- Pick a clearer learning source than Microsoft Learn, for example Andrew Lock's blog (andrewlock.net) or David Fowler's "Minimal APIs at a glance" gist.
- Use the Minimal API style (
dotnet new web), the closest one to FastAPI. - ASP.NET Core does not read
PORTon its own (it readsASPNETCORE_HTTP_PORTSorASPNETCORE_URLS), soPORThas to be mapped by hand inProgram.cs. - Since .NET 9 the OpenAPI document is generated but no UI page is served by default: Swagger UI or Scalar has to be added.
- OAuth with GitHub needs the community package
AspNet.Security.OAuth.GitHub(aspnet-contrib).
Running the spike¶
# Nothing to run: no code was written.
Impressions¶
- Got in the way: the official documentation is hard to read, it leaves many gray areas and does not explain the commands well. I did not feel comfortable with it.
- Got in the way: C# and the ASP.NET Core concepts were new to me; the learning curve is much steeper than with FastAPI, where I already had some experience.
- For AREA: with the same 30 minutes, FastAPI reached the target and the OpenAPI bonus, while ASP.NET Core did not get past the documentation. For a team that would have to learn C# first, this is a real cost to weigh in the matrix (learning curve, spike distance).