mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Server not starting up with 1.0.15 code #174
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 @megha222 on GitHub (May 16, 2019).
Below code gets stuck on the console print.
We are in a build environment where we cannot use our own nuget package manager so we have 2.2.0 version of the Kestrel dependencies which are higher than the one 1.0.15 wiremock expects so we were hoping things would work. Can you let us know how to trap the error that is happening in server start?
@StefH commented on GitHub (May 16, 2019):
You have Microsoft.AspNetCore version 2.2.0 ?
@StefH commented on GitHub (May 16, 2019):
I did a quick test with Microsoft.AspNetCore version 2.2.0 (added to https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.Console.NETCoreApp2) and it works ok.
@ElSiipo commented on GitHub (May 21, 2019):
I hope it's fine that I piggyback on this thread.
I have a issue with getting the server to start (on .NET Framework 4.7.2), which started to occur while migrating from EntityFramework to EntityFramework Core.
I'm constantly getting the following exception when trying to run
httpClient.PostAsync(...)We had no problems with this before starting to migrating to EF Core.
When inspecting the server object,
IsStartedistrue.I get a slight feeling that startTask from
var startTask = _httpServer.StartAsync()is not started, but I can't really say for sure.Example code
var testserver = FluentMockServer.Start(7000); testserver.Given(Request.Create().UsingGet().WithPath("/foo")).RespondWith(MockResponse.Create().WithStatusCode(202).WithBody(@"ok")); var task = Task.WhenAll(new HttpClient().GetStringAsync("http://localhost:7000" + "/foo"));this results in
and
@StefH commented on GitHub (May 21, 2019):
@ElSiipo Can you provide a example project ?
@megha222 commented on GitHub (Jun 11, 2019):
I get a file not found error deep within kestrel server start. It is a also a silent fail so although the mock server starts, it doesnt respond to any requests on the port.
@megha222 commented on GitHub (Jun 19, 2019):
This was a mistake in our application reference assembly bindings. Sorry its a non-issue. It works with Kestrel 2.2.0 as well. Closing this issue. Thanks