question

gonzalt85 avatar image
0 Votes"
gonzalt85 asked lextm answered

SignalR 2 with VueJS

We are working on a VueJS application that needs to interact with a SignalR 2 application (jquery.signalR-2.2.0.min.js, .NET Framework). All the examples that I can see for adding SignalR to Vue are for the SignalR version for .NET Core. Is it possible to use SignalR 2 (.NET Framework) with Vue? Or do we need to create a new SignalR app with .NET Core version. Thanks.

dotnet-aspnetcore-realtime
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FeiHan-MSFT avatar image
0 Votes"
FeiHan-MSFT answered FeiHan-MSFT edited

Is it possible to use SignalR 2 (.NET Framework) with Vue?

Hi @gonzalt85, we can integrate ASP.NET SignalR into VueJS frontend app.

Normally, the reference to the SignalR generated proxy is to dynamically generated JavaScript code, not to a physical file. If your VueJS frontend app is running separately from your SignalR hub server. You can create a physical file that has the proxy code and reference that file with other required jQuery and the SignalR core JavaScript files in your frontend app.


Besides, ASP.NET Core is a new cross-platform, high-performance, open-source framework, you can also migrate your existing SignalR hub server from ASP.NET to ASP.NET Core, and then implement real-time web functionality based on ASP.NET Core SignalR in your VueJS frontend app.


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

With Regards,
Fei Han

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

lextm avatar image
0 Votes"
lextm answered

Use NPM packages like "signalr-no-jquery", https://www.npmjs.com/package/signalr-no-jquery

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.