.net - Can't negotiate Signalr when using only webapi -


i followed following video on getting signal , webapi running together: video

however, i'm unable working on solution. have empty api project has references many other projects have api controllers defined functionality.

in 1 of other projects, wanted add signalr hub communicate client. so, added signalr through nuget.

right off bat began getting owin error added following app settings

<add key="owin:automaticappstartup" value="false" />

i've added hubcontext controller in question so:

private readonly lazy<ihubcontext> _hub = new lazy<ihubcontext>(     () => globalhost.connectionmanager.gethubcontext<taskhub>());  /// <summary> /// gets hub. /// </summary> protected ihubcontext hub {     { return _hub.value; } } 

then in 1 of api calls, added following code send message client:

hub.clients.all.taskloaded();

when started work on client, connection fail each time. after investigation learned .../signalr/negotiate returning 404.

there doing wrong. can't figure out.

you seem not have mapped signalr. add mapsignalr() configuration method in startup class.


Comments

Popular posts from this blog

c# - Where does the .ToList() go in LINQ query result -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -