Help get this topic noticed by sharing it on Twitter, Facebook, or email.

SignalR Framework (Real TIme) on COT project

Does anyone have implemented SignalR framework on any COT project?
Is that possible?



I planned to implement it for chat and notification modules.
If anyone does, please advise.

Thanks & Regards.
4 people have
this question
+1
Reply
  • 1
    Yes, it's possible. You need to install SignalR Core and SystemWeb nuget packages with dependencies and create objects (ChatHub and ConnectionMapping) like described here : https://docs.microsoft.com/en-us/aspn...

    Then create some startup class:

    using Microsoft.Owin;
    using Owin;

    [assembly: OwinStartup(typeof(YourNamespace.Startup))]
    namespace YourNamespace
    {
    public class Startup
    {
    public void Configuration(IAppBuilder app)
    {
    app.MapSignalR();
    }
    }
    }

    After that you need some js to handle it on client side - I used notify.js and something like this:

    $(function () {
    // Declare a proxy to reference the hub.
    var chat = $.connection.chatHub;
    // Create a function that the hub can call to broadcast messages.
    chat.client.broadcastMessage = function (name, message) {

    $.notify(name + ": " + message, { autoHideDelay: 10000, className: 'info' });

    ...
    };
    // Start the connection.
    $.connection.hub.start();
    });
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated