Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hang possibly due to Windows firewall prompt #146

Closed
alexangas opened this issue May 29, 2018 · 4 comments
Closed

Hang possibly due to Windows firewall prompt #146

alexangas opened this issue May 29, 2018 · 4 comments

Comments

@alexangas
Copy link
Collaborator

Hello again 😃

Unfortunately after this change to PortUtil.cs introduced in WireMock.Net 1.0.3.19, the behaviour has changed which is causing some issues.

When trying to use this version on our build server, unit tests that use WireMock hang as soon as their execution commences. I noticed when running them on my dev machine that I was now prompted by Windows Firewall to grant dotnet.exe extra permissions. So my guess is that this same prompt is happening on the build server which we don't have access to.

I tried a couple of things which seem to have fixed the issue on my dev machine, but may well cause problems for others! Without a NuGet package (pre-release would do) I can't test on the build servers.

  1. In PortUtil.cs line 21, changed AddressFamily.InterNetwork to DefaultLoopbackEndpoint.AddressFamily
  2. In AspNetCoreSelfHost.cs lines 79 and 85, changed System.Net.IPAddress.Any to System.Net.IPAddress.Loopback

What are your thoughts?

@StefH
Copy link
Collaborator

StefH commented May 29, 2018

Hello Alex,

I'll revert back the code for point 1.

About point 2 ; this was not changed by me I guess in the last checkin?

@alexangas
Copy link
Collaborator Author

Sorry for not being clear - those points 1 and 2 are things I changed to try and fix this issue based off the WireMock 1.0.3.19 release. It seemed to do it, but i'm not sure if it has unintended site effects.

@StefH
Copy link
Collaborator

StefH commented May 29, 2018

For now I'll revert back the code for point 1, I've created a PR for that.
About point 2, this did work for me, so for now, I'll keep that code. In case a change is needed, please create a new issue or PR with some code to reproduce if possible.

@StefH
Copy link
Collaborator

StefH commented May 29, 2018

For now I close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants