Hub loading error. HTML5 / js front-end and C # back-end

enter image description hereWe are not using asp.net MVC. We are using SignalR with C # backend and HTML5 page with js.

Our SignalR code works great when deployed on Windows Server 2012 R2 with IIS 7.5.

Launch code:

 public void Configuration(IAppBuilder app)
        {
            // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
            app.MapSignalR();
        }

      

Js link code:

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

      

Code initialization:

var hubEngine = $.connection.allEnginesHub;
        $.connection.hub.logging = true;
        $.connection.hub.start()

      

We are now trying to deploy this solution on Windows 7 using IIS 7.5

And we get the error

SignalR: Error loading hubs. Make sure the hub link is correct, eg.

We tried several solutions by changing the js script to ~ / signalR / hubs posted on this site and none of them seem to solve our problem

1) http://www.codeproject.com/Questions/840675/Why-I-am-getting-the-error-signalr-hubs-not-found

2) Signalr / Hub doesn't load in IIS 7, but works correctly in Visual Studio

3) http://www.codeproject.com/Questions/753256/SignalR-Hub-with-Multi-Form

4) SignalR / signalr / hubs 404 Not found

5) How do I get a SignalR hub connection to work in a cross-domain domain?

6) http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client#manualproxy

We cannot figure out how to debug this issue or how to fix it.

We will continue to add details to the issue as requested.

+3


source to share


1 answer


Try to put:

<script src="@Url.Content("~/signalr/hubs")" type="text/javascript"></script>

      



instead:

<script src="signalr/hubs"></script>

      

0


source







All Articles