locked
SignalR v0.2.0-alpha1 in ASP.NET Core 2.0: 'SignalR 2.0 error /signalr/hubs 404 (Not Found) RRS feed

  • Question

  • User1751268424 posted

    Hi all?

    I am using SignalR v0.2.0-alpha1 in ASP.NET Core 2.0, but I'm getting http error 404 when I called http://localhost:51772/signalr/hubs

    This is part of my startup

            public void ConfigureServices(IServiceCollection services)
            {
                services.AddMvc();
                services.AddSignalR();
            }

    and this is my bower.json

    {
      "name": "asp.net",
      "private": true,
      "dependencies": {
        "bootstrap": "3.3.7",
        "jquery": "2.2.0",
        "jquery-validation": "1.14.0",
        "jquery-validation-unobtrusive": "3.2.6",
        "signalr": "2.2.2"
      }
    }

    Last, this is my index.cshtml on Home views

    @{ 
        ViewData["Title"] = "Home Page";
    }
    
    <span id="MessageDisplay">
    
    </span>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/signalr/jquery.signalR.min.js"></script>
    <script src="Signalr/hubs"></script>
    <script>
        var hubProxy = $.connection.hub.createHubProxy("myHub");
        $.connection.hub.start().done(function () { 
            alert('HUB Started');
        });
    </script>

    Need help please.. 

    Wednesday, October 25, 2017 11:41 PM

All replies