ASP.NET Core API reachable from Blazor apps but not Fiddler or older ASP.NET Core apps

Dennis Tabako 36 Reputation points
2022-03-16T15:53:07.72+00:00

I have created a Blazor app with an ASP.NET Core API (separate project) targeting .NET 5. The Blazor app can connect to, and get data from, the API without issue. But when I try to make calls to the API from Fiddler or from an older ASP.NET Core 2.1 app, I get: ReadResponse() failure System.Net.Sockets.SocketException An existing connection was forcibly closed by the remote host. I created another, separate, Blazor app to see if it could access my API and that works fine as well. So there seems to be something in the setup I'm missing. I've seen references to older version of TLS being used, but if that is the issue nothing seems to point to a good way to solve that on a Blazor app/ASP.NET Core API. I wouldn't exactly call myself a "beginner" at writing web apps, but I wouldn't call myself "advanced" either. Any help would be appreciated. If you need more specific info, please let me know.

Thanks,
Dennis

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,140 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,378 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,041 Reputation points
    2022-03-16T17:20:27.453+00:00

    you need to enable tls 1.2 on the old app

    https://karthiktechblog.com/aspnetcore/how-to-use-tls-1-2-in-asp-net-core-2-0-and-above

    note: core 2.1 has been out of support since aug 21, 2021