Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

SignalR #8049


User avatar
0
drg created

Hello,

I'm using version Abp 4.1.0 and I want implement signalR. I find out that the functionality is not fully implemented (some classes use a compiler directive #if FEATURE_SIGNALR) Unfortunately download latest version of ASP.Net Zero is not an option so I upgraded all packages to v4.10.1

Even more:

  • implement latest chat functionality by copying the needed classes.
  • enable signalr
  • use javascript chat.signalr.js in layout.cshtml

The application runs but I ran out into an issue with javascript abp.signalr.js and checks if abp.signalr.hubs.common is defined. If not, the whole executing is aborted.

How to make it work?

Any help is appreciated.

Kind regards Tako Verkroost


10 Answer(s)
  • User Avatar
    0
    BobIngham created

    Hi @drg, This may help you: Simple SignalR implementation

  • User Avatar
    0
    drg created

    Hi @bobingham,

    Didn't work, because error in script abp.signalr-client.js which is part of abp-web-resources:

    // Check if SignalR is defined if (!signalR) { return; }

    How to accomplish this?

  • User Avatar
    0
    BobIngham created

    @hrg, that's MVC with jQuery. Sorry, can't help. Have you searched the github pages and the forum for "signalr"?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @drg

    Did you solve this problem ?

  • User Avatar
    0
    drg created

    Hi @ismcagdas,

    Unfortunately, it's not. Do you know another way to help me out? Any help is appreciated.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    If the commonHub is undefined, then your app is not using SignalR. Is your project .netcoreapp2.x or netcoreapp1.x ?

    In any case, you can follow this PR https://github.com/aspnetzero/aspnet-zero-core/pull/1252/files to enable SignalR Core in your app.

  • User Avatar
    0
    drg created

    Hi @ismcagdas,

    My project use .netcoreapp2.2 framework. The link doesn't work unfortunately (page not found 404).

    Please help me out.

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi @drg, to view the aspnetzero link on github, you will need to login with the github account that is associated with your aspnetzero license.

  • User Avatar
    0
    drg created

    Hi @ryancyq and @ismcagdas,

    I followed all needed changes to fix the problem and it worked. Thanks a lot!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Great :)