Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method not found: Microsoft.AspNetCore.Connections.BaseConnectionContext.get_Features()

I have an ASP.NET Core 5.0 Web API used with an angular Web client. I'm using SignalR and it works fine.

Now I want to use a SignalR client to communicate with a third party service. So I installed the Microsoft.AspNetCore.SignalR.Client nuget.

As soon as I start the Web API, and even without instanciating a SignalR client, I have the following error:

System.MissingMethodException: Method not found: 'Microsoft.AspNetCore.Http.Features.IFeatureCollection Microsoft.AspNetCore.Connections.BaseConnectionContext.get_Features()'.

   at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext..ctor(String connectionId, String connectionToken, ILogger logger)

   at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager.CreateConnection(PipeOptions transportPipeOptions, PipeOptions appPipeOptions, Int32 negotiateVersion)

   at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher.CreateConnection(HttpConnectionDispatcherOptions options, Int32 clientProtocolVersion)

   at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher.ProcessNegotiate(HttpContext context, HttpConnectionDispatcherOptions options, ConnectionLogScope logScope)

   at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher.ExecuteNegotiateAsync(HttpContext context, HttpConnectionDispatcherOptions options)

   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)

   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)

   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

I understand the error message, but not why adding a NuGet replaced a core server component. How can I solve this problem?


1 Answers

The fix in my case was I had to update all .NET libraries from 5.0.12 to the latest 5.0.15.

like image 195
Vangi Avatar answered Jun 06 '26 06:06

Vangi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!