SignalR self host: Connection must be started before data can be sent. Call .start() before .send() -


I know this is another post related to this problem :)

I write my Trying to use the Signal R Sl-Host Library (according to the tutorial) project, but this error can not be passed now.

I start the connection as follows:

  $ .connection.hub.url = "http: // localhost: 8182 / signal"; $ .connection.hub.logging = true; Var Connection = $ .connection.hub.start (); Console.log (connection.state ()); Connection.done (function () {console.log (connection.state ()); [...] // initial view models here ...});  

When the first view-model starts, I get the error according to the thread subject:

  [17:29:14 GMT + 0100 ( GMT Daylight Time) SignalRe: Auto Detects Cross Domain Url. Jquery.signalR-2.0.3.js: 76 [17:29:14 GMT + 0100 (GMT Daylight Time)] SignalR: Talking with 'http: // LocalHost: 8182 / Signal / Chat / Client Prototyled = 1.3' . Jquery.signalR-2.0.3.js: 76 Pending main.js: 218 [17:29:14 GMT + 0100 (GMT Daylight Time)] SignalR: SSE Endpoint 'http: // localhost: 8182 / Connecting to Signalar attempt to ? / Transport transport = serverSentEvents & amp; Connection ... pdQlpKjRBpUhB0PY4itVfHasSmixQAAAB0HA7hA9gYDflrhGockG% 2FZR55tLg% 3D% 3D & amp; TID = 1 '. Jquery.signalR-2.0.3.js: 76 [17:29:14 GMT + 0100 (GMT Daylight Time)] Signal: Eventosource Connect. Jquery.signalR-2.0.3.js: 76 [17:29:14 GMT + 0100 (GMT Daylight Time)] SignalR: Surveillance now survives with an alert of 13333.333333333332 and a time of connection 20000 expired . Jquery.signalR- 2.0.3.js: 76 resolved main.js: 220 Object {getAccountActions: function, getIncidentActionCount: function, getIncidentActions: function, refreshAccountActions: function, refreshActions: function ... IncidentAction.js: 12 Unsolicited Error Signal R: The connection must start before sending data before .start (). Send ()  

Connection status after connection. Doon console.one and being clearly resolved.

As well as the first visual model I started, I console Connection.server and all my server methods are visible there, according to the snippet above.

Server side code:

  class program {static zero main (string [] args) {string url = "http: // localhost: 8182"; (WebApp.Start (url)) {Console.WriteLine ("Server is running {0}", url); Console.ReadLine ();  

Edit: Basically I have any suggestions, why am I getting this error though 'Connection' solution?

My Owin startup class was taken to the server for a separate project in my solution and I think due to this problem when I put it in my own signal R itself in the host project, the error happened.

The connection state should be added

Try it like this: / P>

  $ .connection.hub.start (). Done (function () {console.log (connection.state ());}) .file (function (error) {console.log ('invitations to start failed. Error:' + error)});  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -