SignalR Error loading hubs. How to handle when service is down -


I have a signal r application that is self hosted Windows service Hub .

My JavaScript client is in index.html:

  & lt; Script src = "http: // localhost: 8080 / signalr / hubs" & gt; & Lt; / Script & gt;   

But the Windows service is not always running, so if this is not running and I try to load index.html then I get the error:

  Unwanted error: Signal R: Error loading hub. Make sure your center reference is correct, e.g. & Lt; Script src = '/ signalr / js' & gt; & Lt; / Script & gt;   

It makes sense because it does not search for the Javascript file until the Windows service is running.

So my question is, how can I make it flexible,

  $ .getScript ("http: // localhost: 8080 / signalr / hubs") .done (script), textstats) {});    

Comments

Popular posts from this blog

php - how to change mysql_result($res, 0, "url"); to mysqli -

c# - Textbox not clickable but editable -

Matlab transpose a table vector -