SignalR 2 with VueJS

gonzalt85 1 Reputation point
2020-11-30T18:39:01.753+00:00

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.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,199 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Fei Han - MSFT 306 Reputation points Microsoft Vendor
    2020-12-01T02:31:10.78+00:00

    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

    0 comments No comments

  2. Lex Li (Microsoft) 4,742 Reputation points Microsoft Employee
    2020-12-15T07:41:04.193+00:00

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

    0 comments No comments