aspnet / HttpSysServer

[Archived] A web server for ASP.NET Core based on the Windows Http Server API. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
106 stars 39 forks source link

Port sharing between different processes. #452

Closed vitalybibikov closed 5 years ago

vitalybibikov commented 6 years ago

Hello,

Please, explain, how HttpSys shares port between different processes?

What I want to achieve:

I have an application - bunch of services, that are running as a separate processes in SF Cluster, that are listening on the same port, e.g. :80/%SomeUniquePrefix% for each service.

I want to start another service outside of that cluster simply utilizing command "dotnet run". This service supposed to listen on the same port :80/%SomeUniquePrefix%.

For some reason, the later service does not work on that particular :80 port and responds with 503.

Everything works fine when: 1) I change the port from 80 to something else. (so, everything is fine with service itself) 2) I stop my cluster which occupies the port (it starts to respond, so the problem is with this particular port)

Why I face the problem? Can it be solved?

Thanks.

Tratcher commented 6 years ago

Take a look at https://stackoverflow.com/questions/22293445/http-503-service-is-unavailable-when-trying-to-browse-signalr-hubs/22972905#22972905

Http.Sys prefix registrations are interpreted very literally. The value you pass in to the ASP.NET HttpSys server must match the value pre-registered with netsh. I don't know how SF handles netsh registrations.