I have a windows hosted SignalR hub created in VS2012:
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseCors(CorsOptions.AllowAll);
app.MapSignalR();
}
}
public static class SignalR
{
public static void Start()
{
const string url = "http://*:8080";
WebApp.Start<Startup>(url);
}
}
public class Broadcaster : Hub
{
public void SendDownloadResult(bool result, string device, string description, string connectionId, string task)
{
var context = GlobalHost.ConnectionManager.GetHubContext<Broadcaster>();
context.Clients.Client(connectionId).sendDownloadResult(result, device, description, task);
}
}
I have deployed this windows service on 3 different PCs, it works fine on two PCs, but on the other, I get HTTP 503 Service is unavailable when I try to browse http://localhost:8080/signalr/hubs
No exception thrown when the code is executed on all 3 PCs.
I have checked IIS's features in add/remove windows features, they're all the same.
What am I missing?
I also realised, that in one of the PCs, port 8080 was in use.
Changing the port from
to
solved the issue
I also had same issue. I rectified it by changing
TO
I was able to reproduce this locally with the following setup:
http://localhost:8080/
WebApp.Start<Startup>("http://*:8080")
http://localhost:8080/
What happens is that Http.Sys accepts the incoming request, examines the host header, decides that there is a reservation for localhost:8080, but realizes that no application is listening to localhost:8080, only *:8080. Http.Sys then returns the 503.
Solutions:
WebApp.Start<Startup>("http://+:8080")