Question: URL binding issues #74

Closed
opened 2025-12-29 14:22:01 +01:00 by adam · 6 comments
Owner

Originally created by @alexangas on GitHub (Mar 8, 2018).

Originally assigned to: @StefH on GitHub.

Hello again! First, apologies that this is an issue that partly asks questions due to my lack of understanding, and/or mentions some bugs. Either way, i'm happy to help with updating documentation and maybe even fixing bugs if I know how. The primary confusion is differences in how the Java implementation works.

Attached is a .NET Core test app that is really simple. It takes parameters of IP to bind to, port number, and whether to run in StandAlone mode. WireMock_NetCore.zip. So some questions based on this:

  1. Whether running in StandAlone mode or not, the app appears to behave the same. What is the difference?
  2. In the Java implementation, when binding to 127.0.0.1 I get a response whether connecting to localhost or the network adapter's IP. In WireMock.Net, only 127.0.0.1 works. Is this intended?
  3. In the Java implementation, when binding to 127.0.0.1 or the network adapter's IP, I get a response when connecting from another machine on the network. In WireMock.Net there is no connection. I've tried two completely different networks. Why would this be?
  4. Not sure if this is a bug or not, but when binding to http://10.0.0.5:8080WireMock.Net starts up with "Now listening on: http://127.0.0.1:8080" but theUrlsproperty containshttp://10.0.0.5:8080`.

Thank you for any help and apologies for the ramblings!

Originally created by @alexangas on GitHub (Mar 8, 2018). Originally assigned to: @StefH on GitHub. Hello again! First, apologies that this is an issue that partly asks questions due to my lack of understanding, and/or mentions some bugs. Either way, i'm happy to help with updating documentation and maybe even fixing bugs if I know how. The primary confusion is differences in how the Java implementation works. Attached is a .NET Core test app that is really simple. It takes parameters of IP to bind to, port number, and whether to run in StandAlone mode. [WireMock_NetCore.zip](https://github.com/WireMock-Net/WireMock.Net/files/1793293/WireMock_NetCore.zip). So some questions based on this: 1. Whether running in StandAlone mode or not, the app appears to behave the same. What is the difference? 2. In the Java implementation, when binding to 127.0.0.1 I get a response whether connecting to localhost or the network adapter's IP. In WireMock.Net, only 127.0.0.1 works. Is this intended? 3. In the Java implementation, when binding to 127.0.0.1 or the network adapter's IP, I get a response when connecting from another machine on the network. In WireMock.Net there is no connection. I've tried two completely different networks. Why would this be? 4. Not sure if this is a bug or not, but when binding to http://10.0.0.5:8080` WireMock.Net starts up with "Now listening on: http://127.0.0.1:8080" but the `Urls` property contains `http://10.0.0.5:8080`. Thank you for any help and apologies for the ramblings!
adam added the question label 2025-12-29 14:22:01 +01:00
adam closed this issue 2025-12-29 14:22:01 +01:00
Author
Owner

@StefH commented on GitHub (Mar 8, 2018):

  1. The StandAlone only adds commandline argument parsing, so it's easy to use in a console app or a docker app.

  2. Can you try to connect to "http://*:8080" ?

  3. I don't know. A wild guess ; do you run wiremock as admin ?

  4. This is logging from .NET itself, so I don't know how to change that.

@StefH commented on GitHub (Mar 8, 2018): 1. The StandAlone only adds commandline argument parsing, so it's easy to use in a console app or a docker app. 2. Can you try to connect to "http://*:8080" ? 3. I don't know. A wild guess ; do you run wiremock as admin ? 4. This is logging from .NET itself, so I don't know how to change that.
Author
Owner

@alexangas commented on GitHub (Mar 9, 2018):

Thanks for getting back to me! A few responses:

  1. That's great. Perhaps I was expecting to find a .exe somewhere. Would you like help with updating the wiki with more details?

2 and 3. I've bound to that, run as admin and no luck. I will do more investigation and raise in a new issue if it's still a problem.

  1. That's OK and it's a relatively minor thing. I guess I was expecting the Urls property to be actual bindings and not requested. It's not clear from the code comments.

Cheers

@alexangas commented on GitHub (Mar 9, 2018): Thanks for getting back to me! A few responses: 1. That's great. Perhaps I was expecting to find a .exe somewhere. Would you like help with updating the wiki with more details? 2 and 3. I've bound to that, run as admin and no luck. I will do more investigation and raise in a new issue if it's still a problem. 4. That's OK and it's a relatively minor thing. I guess I was expecting the `Urls` property to be _actual_ bindings and not requested. It's not clear from the code comments. Cheers
Author
Owner

@StefH commented on GitHub (Apr 22, 2018):

Hello @alexangas

For point 1, yes please that would help me a lot.

For point 2 and 3, does the latest version which includes this fix (https://github.com/WireMock-Net/WireMock.Net/pull/125) work for you ?

@StefH commented on GitHub (Apr 22, 2018): Hello @alexangas For point 1, yes please that would help me a lot. For point 2 and 3, does the latest version which includes this fix (https://github.com/WireMock-Net/WireMock.Net/pull/125) work for you ?
Author
Owner

@StefH commented on GitHub (May 19, 2018):

Hello @alexangas, did you have time to validate ?

@StefH commented on GitHub (May 19, 2018): Hello @alexangas, did you have time to validate ?
Author
Owner

@alexangas commented on GitHub (May 21, 2018):

Apologies - I've had very little time over the last few weeks. I will get to it this week however.

@alexangas commented on GitHub (May 21, 2018): Apologies - I've had very little time over the last few weeks. I will get to it this week however.
Author
Owner

@StefH commented on GitHub (Jul 2, 2018):

Hello @alexangas I'm closing this issue now. If you need more help, just open a new issue or start a a chat at https://gitter.im/wiremock_dotnet/Lobby.

@StefH commented on GitHub (Jul 2, 2018): Hello @alexangas I'm closing this issue now. If you need more help, just open a new issue or start a a chat at https://gitter.im/wiremock_dotnet/Lobby.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#74