I have my SignalR Host in a simple Windows Service application.
protected override void OnStart(string[] args)
{
const string url = "https://localhost:8080";
AppDomain.CurrentDomain.Load(typeof(MyHub).Assembly.FullName);
using (WebApp.Start<Startup>(url))
{
Log(string.Format("Device Hub started on {0}", url));
}
}
Where MyHub
is the name of my Hub
class in a referenced console project and Startup
is just
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
app.UseCors(CorsOptions.AllowAll);
}
}
SignalR seems to start, but I keep getting a 404 Error on https://localhost:8080/signalr/hubs
. I think it may not be recognizing the hub, but I can't quite figure out how to register it. Any suggestions?
** This exact code worked when running a console application, but seems to fail now that it is being accessed via a service **