mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Issue: Unable to get host to listen on ips other than 127.0.0.1 using StandAloneApp #92
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cYCL157 on GitHub (Apr 11, 2018).
In trying to configure the StandAloneApp to listen on all ips, I keep coming up with the issue that it appears to only listen on 127.0.0.1 (localhost/loopback). I found this line of code that seems like it forces it to loopback:
https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs#L79
I am ultimately trying to implement this in a docker container and found this issue in being unable to expose the listening port. Am I missing something?
Thanks for any help! Loving the tool!
@StefH commented on GitHub (Apr 11, 2018):
I have a project https://github.com/WireMock-Net/WireMock.Net-docker ,did you already see this?
About docker issues : In my case this seemed to be only the case when running a windows container on a windows machine. To fix this I used a docker port proxy tool. Sadly I forgot the real name for that tool, if I remember it, I will copy this here.
@SubjectiveReality commented on GitHub (Apr 11, 2018):
What do you think about changing System.Net.IPAddress.LoopBack to System.Net.IPAddress.Any? I've cloned and tried this on my windows machine & windows container and it works, but I'm not sure what else this might break. I'm expecting perhaps not much since it is hardcoded currently to listen to LoopBack anyway.
@StefH commented on GitHub (Apr 12, 2018):
Did you also check this on windows in a linux container? If this also works, you can create a PR.
@SubjectiveReality commented on GitHub (Apr 12, 2018):
I have now and it also works. I'll create a PR shortly, thanks!
@SubjectiveReality commented on GitHub (Apr 16, 2018):
When do you expect to create a new release with the latest merges included?
On Sun, Apr 15, 2018, 4:23 AM Stef Heyenrath notifications@github.com
wrote:
@StefH commented on GitHub (Apr 16, 2018):
It's merged and a new version is added to NuGet.
@alastairtree commented on GitHub (Apr 19, 2018):
Thanks, fixed same issue for me when unable to access the standalone mock externally, despite working fine on localhost.