question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Discussion] UseSignalR and UseConnections are marked obsolete

See original GitHub issue

The methods UseConnections and UseSignalR, and the classes ConnectionsRouteBuilder and HubRouteBuilder are being marked obsolete in 3.0. And will be removed in the next major release after that.

The preferred method for using SignalR starting in 3.0 is to use Endpoint Routing. See example below.

Old code:

app.UseSignalR(routes =>
{
    routes.MapHub<SomeHub>("/path");
});

New code:

app.UseEndpoints(endpoints =>
{
    endpoints.MapHub<SomeHub>("/path");
});

This is the discussion issue for aspnet/Announcements#362.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
davidfowlcommented, Oct 30, 2019

What is you’re not using MVC, instead you’re using Web API… What’s the implementation for SignalR that is replacing the obsolete UseSignalR() method?

The code above is the same.

PS: MVC is the same thing as Web API in ASP.NET Core. It’s a single framework.

1reaction
Kahbazicommented, Jun 4, 2019

@VictorioBerra yes, there’s also MapController extension method for mvc

Read more comments on GitHub >

github_iconTop Results From Across the Web

SignalR: UseSignalR and UseConnections methods ...
As part of that change, the UseSignalR, UseConnections, and some related methods were marked as obsolete. In ASP.
Read more >
What's new in ASP.NET Core 3.0, Blazor and SignalR
Discussion issue. IHostingEnvironment's and IApplicationLifetime's marked obsolete and replaced. Quoting Tratcher: When Microsoft.Extensions.
Read more >
ASP. SignalR requires . NET Core SignalR and Azure SignalR ...
1, we can now use SignalR streaming which is a new feature that allows us to push data ... UseConnections, and some related...
Read more >
ASP.NET Core and Vue.js
A busy .NET developer's step-by-step guide to building fully functional, cloud-ready, and professional web apps without diving into the theory of frameworks ...
Read more >
Net | PDF | Xml | Microsoft Visual Studio
are marked as obsolete in ASP.NET Core 3.0. Version introduced 3.0. Old behavior SignalR hub routing was configured using UseSignalR or UseConnections ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found