Closed Sicos1977 closed 5 months ago
These libraries are not supported on .NET 5+, only .NET Framework 4.x. The framework's HttpListener implementation is different and that's causing this error.
On .NET 5+ you should move to AspNetCore instead.
Any way to solve this so that I can have a .netstandard2.0 that can support both worlds?
The only version of Asp.Net that directly supports .netstandard2.0 is AspNetCore 2.1, designed to run on both .NET Framework 4.x and .NET Core 2.1. However, .NET Core 2.1 is out of support.
I've made a .netstandard 2.0 class library with in it a web api controller
public class SchedulerController : ApiController
There is also a class called StartUp in it with this code
I installed the following packages
I also have a .net6.0 console app in my solution where I call the StartUp class like this
This al seems to work fine but as soon as I try to send a request from Postman like this
I always get this exception... it is driving me nuts... why do I get this?