HTTP 503 Service is unavailable when trying to browse signalr/hubs

大兔子大兔子 提交于 2019-11-29 09:12:56
Tratcher

I was able to reproduce this locally with the following setup:

  1. Use NetSh.exe or similar tool to reserve http://localhost:8080/
  2. Call WebApp.Start<Startup>("http://*:8080")
  3. Browse to 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:

  1. Try WebApp.Start<Startup>("http://+:8080")
  2. Remove the Http.Sys/NetSh registration

I also had same issue. I rectified it by changing

 const string url = "http://*:8080";

TO

 const string url = "http://+:8080"; // * replaced by +

I also realised, that in one of the PCs, port 8080 was in use.

Changing the port from

const string url = "http://*:8080";

to

const string url = "http://*:8088";

solved the issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!