SignalR 2 ne génère pas d' /signalr/hubs

Voici la page:

        <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.signalR-2.1.2.min.js"></script>
    <!--Reference the autogenerated SignalR hub script. -->
    <script src="~/signalr/hubs"></script>
    <!--SignalR script to update the chat page and send messages.-->
    <script>
        $(function () {
            //Reference the auto-generated proxy for the hub.
            var notification = $.connection.notificationHub;
            //Create a function that the hub can call back to display messages.
            notification.client.addNewMessage = function (message) {
                //Add the message to the page.
                $('#discussion').append('<li><strong>'
                    + '</strong>: ' + htmlEncode(message) + '</li>');
            };
            //Set initial focus to message input box.
            $('#message').focus();
            //Start the connection.
            $.connection.hub.start().done(function () {
                $('#sendmessage').click(function () {
                    //Call the Send method on the hub.
                    chat.server.send($('#message').val());
                    //Clear text box and reset focus for next comment.
                    $('#message').val('').focus();
                });
            });
        });
        //This optional function html-encodes messages for display in the page.
        function htmlEncode(value) {
            var encodedValue = $('<div />').text(value).html();
            return encodedValue;
        }
    </script>

Ici est la plaque tournante de la classe:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;

namespace AdminWebApp.Hubs
{
     [HubName("notificationHub")] 
    public class NotificationHub : Hub
    {

        public void SendNotification(string message)
        {
            Clients.All.addNewMessage(message);
        }
    }
}

De démarrage.cs:

using Microsoft.Owin;
using Owin;

[assembly: OwinStartupAttribute(typeof(AdminWebApp.Startup))]
namespace AdminWebApp
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            ConfigureAuth(app);
        }
    }
}

Lorsque j'essaie d'accéder à: http://localhost:4551/signalr/hubs j'obtiens une erreur HTTP 404 non trouvé erreur et quand j'essaie d'exécuter la page j'obtiens:

 Failed to load resource: the server responded with a status of 404 (Not Found)
 Uncaught TypeError: Cannot read property 'client' of undefined 

J'ai essayé ceci: signalR : /signalr/hubs n'est pas généré et ça n'a pas fonctionné.

Des idées?

OriginalL'auteur Niclassg | 2014-10-09