Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] UseSignalR and UseConnections are marked obsolete #10754

Closed
BrennanConroy opened this issue Jun 3, 2019 · 5 comments
Closed

[Discussion] UseSignalR and UseConnections are marked obsolete #10754

BrennanConroy opened this issue Jun 3, 2019 · 5 comments
Milestone

Comments

@BrennanConroy
Copy link
Member

BrennanConroy commented Jun 3, 2019

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.

@VictorioBerra
Copy link
Contributor

VictorioBerra commented Jun 4, 2019

I haven't looked at the code yet, sorry if this is a dumb question. So UseEndpoints is a core thing (in a non-SigR namespace) and MapHub is a SignalR extension method for creating a new endpoint and mapping a hub to it?

@Kahbazi
Copy link
Member

Kahbazi commented Jun 4, 2019

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

@idrivediesel2006
Copy link

idrivediesel2006 commented 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?

@davidfowl
Copy link
Member

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.

@ghost
Copy link

ghost commented Dec 2, 2020

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@ghost ghost closed this as completed Dec 2, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants