c# - Path not found error -


i installed signalr 2.0-rc1, and:

1: created hub:

public class socials : hub {     public void publicchat(string message)     {         clients.all.publicchat(new { message });     } } 

2: created startup class:

public class startup {     public void configuration(iappbuilder app)     {         app.mapsignalr();     } } 

3: registered in web.config:

<add key="owin:appstartup" value="scyk.startup, scyk"/> //scyk main namespace, project name, placed startup class in there. 

now, https://myhost.com/signalr/hubs generating javascript file properly, when open developer console in browser, see has not connected, but:

  1. there asp error saying path /signalr/connect not found (why trying access /signalr/connect? normal? if so, must purely routing problem, how solve it?)
  2. in console, see there eventsource's response has mime type ("text/html") not "text/event-stream". aborting connection. error. not sure if related, started show today, wasn't there before.

what doing wrong?

any path beginning /signalr should routed through owin signalr can handle request.

it normal client try access /signalr/connect after accessing /signalr/negotiate. /signalr/connect endpoint signalr establishes websockets/server-sent events/forever frame/long polling connections.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -