Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • duyquy301 9 posts 78 karma points
    Aug 07, 2015 @ 05:04
    duyquy301
    0

    signalr

    Hi there,

    I'm build project chat with SignalR. I using v7 and mvc. I have chathub class at MVC project. When i run page error

    <script src="~/signalr/hubs"></script>
    404 not found.

    Please help me.

    Thanks

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Aug 07, 2015 @ 12:02
    Alex Skrypnyk
    1

    Hi,

    You need to add these scripts to your page :

    <script src="~/Scripts/jquery.signalR-2.2.0.min.js"></script>
    <script src="~/signalr/hubs"></script>
    

    Add to main script file :

    $.connection.hub.start({ transport: ['webSockets', 'longPolling'] });
    

    And do you have these nuget packages ?

      <package id="Microsoft.AspNet.SignalR" version="2.2.0" targetFramework="net45" userInstalled="true" />
      <package id="Microsoft.AspNet.SignalR.Core" version="2.2.0" targetFramework="net45" userInstalled="true" />
      <package id="Microsoft.AspNet.SignalR.JS" version="2.2.0" targetFramework="net45" userInstalled="true" />
      <package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.0" targetFramework="net45" userInstalled="true" />
    
  • duyquy301 9 posts 78 karma points
    Aug 13, 2015 @ 09:35
    duyquy301
    0

    Hi Alex Skrypnyk

    Affter i add script

    $.connection.hub.start({ transport: ['webSockets', 'longPolling'] });

    then show error

    Uncaught Error: SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g.

    <script src='/signalr/hubs'></script>
    .

    Thanks

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Sep 30, 2015 @ 12:20
    Tim Geyssens
    0

    Hey, you'll need to make sure Umbraco ingnores the /signalr path, you can do that by updating the web.config app setting

    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/signalr/" />

  • Danny Drogt 10 posts 121 karma points c-trib
    Oct 22, 2015 @ 22:17
    Danny Drogt
    0

    Edit: wrong thread. For people having problems using SignalR with Umbraco 7.3.0+ see this thread

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies