Closed klym1 closed 5 years ago
Did you run the application once with RewriteLocalHost = true? Your
problem is likely an issue with how Windows handles overlapping/conflicting
http urlacl reservations.
If there is an entries for both http://+:4444/ and http://localhost:4444/
Windows will return a 503 for the application listening on localhost. You
can list all reservations with netsh http show urlacl
. You can remove
the wildcard reservation by running nesth http remove urlacl http://+:4444/
(from an administrator cmd prompt)
On Tue, Aug 28, 2018 at 10:50 AM Mykola Klymyuk notifications@github.com wrote:
Prerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of Nancy
- I have verified if the problem exist in both DEBUG and RELEASE mode
- I have searched open https://github.com/NancyFx/Nancy/issues and closed https://github.com/NancyFx/Nancy/issues?q=is%3Aissue+is%3Aclosed issues to ensure it has not already been reported
Description
Trying to run self-hosted Nancy with RewriteLocalhost=false:
_host = new NancyHost(new Uri("http://localhost:4444/"), new HostBootstrapper(), new HostConfiguration { RewriteLocalhost = false });_host.Start();
But it doesn't work, when I try to send some request it always responses with 503 Status:
GET / HTTP/1.1 Host: localhost:4444 User-Agent: insomnia/6.0.2 Accept: /
HTTP/1.1 503 Service Unavailable Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 Date: Tue, 28 Aug 2018 16:40:50 GMT Connection: close Content-Length: 326
I don't want Nancy to listen on http://+:4444/ but simply on the IP I provide. System Configuration
- Nancy self-hosted
- Nancy 1.4.4.0, Nancy.Hosting.Self 1.4.1.0
- Windows 10 x64
- .Net 4.7.1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NancyFx/Nancy/issues/2925, or mute the thread https://github.com/notifications/unsubscribe-auth/AEEilnKHS2zheNFCdydtfm4g2lKDqxrEks5uVXTagaJpZM4WQAYC .
-- Jonathon Koyle
@cloudhunter89 Thanks for the answer. Yes, indeed, previously Nancy host was usually started with default RewriteLocalHost
value (which is true). Who would expect that 503 is returned by OS!
Removing the reservation has fixed the problem.
Prerequisites
DEBUG
andRELEASE
modeDescription
Trying to run self-hosted Nancy with
RewriteLocalhost=false
:But it doesn't work, when I try to send some request it always responses with 503 Status:
I don't want Nancy to listen on http://+:4444/ but simply on the IP I provide.
System Configuration