Skip to main content

Command Palette

Search for a command to run...

Upgrading to .NET 8

Updated
1 min read
Upgrading to .NET 8
B

Expert generalist • Independent Contractor • Microsoft MVP • Home Assistant enthusiast Hi there! I'm Bogdan Bujdea, a software developer from Romania. I'm currently a .NET independent contractor, and in my free time I get involved in the local .NET community or I'm co-organizing the @dotnetdays conference. I consider myself an expert generalist, mostly because I enjoy trying out new stuff whenever I get the chance and I get bored pretty easily, so on this blog you'll see me posting content from programming tutorials to playing with my smart gadgets.

I am currently working on several projects, and I plan to migrate all of them to .NET 8. That's why I thought it would be helpful to write an article detailing the various challenges I encountered during this process.

  1. Port 80 is no longer the default

This project is an ASP.NET Web API on .NET 7 and it's really fresh, a few days old, but I still had issues upgrading to .NET 8. When I deployed the project to Azure Container Apps I got this error:

upstream connect error or disconnect/reset before headers. retried and the latest reset reason: remote connection failure, transport failure reason: delayed connect error: 111

After ~30 minutes I figured out that .NET 8 is listening on port 8080 instead of 80, and when I googled this I immediately found out that this is a breaking change. Here's the link with more details:

https://learn.microsoft.com/en-us/dotnet/core/compatibility/containers/8.0/aspnet-port

I'll update this blog post when I have more stuff.

B

Hi again Bogdan Bujdea. Have you made any progress on this? I've noticed that a standard ACA deployment will fail if no startup/liveness probes are defined since the default (https://learn.microsoft.com/en-us/azure/container-apps/health-probes?tabs=arm-template#default-configuration) startup probe uses port 80. Explicitly configuring probes with port 8080 resolves this. However, I'm still running into the same issue you reported when using HTTPS port 443 to access the API deployed on ACA.

B

Hi Bogdan. I ran into the same issue. Have you found a way to resolve this? I tried adding the ASPNETCORE_HTTP_PORTS, but it doesn't resolve the issue.