mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
WireMock WebApplication example doesn't run on Net Core 3.1 #298
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 @tomatualus on GitHub (Oct 1, 2020).
Describe the bug
When i change the Net Core versions in the [https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.WebApplication](WebApplication example), i a Service Unavailable error message on the website and that's all.
Expected behavior:
Changing to Net Core 3.1 version should not produce any errors, or if it does, please make a working example.
@tomatualus commented on GitHub (Oct 1, 2020):
Well, somehow i got it going. I have no idea what did i do, but the last thing i did was in web.config change hostingModel value to "outofprocess"
@StefH commented on GitHub (Oct 1, 2020):
Hello @tomatualus,
I did add a new Net Core 3.1 project (https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.WebApplication.NETCore3) which seems to run fine, except that I cannot get the logging to work. Maybe you have an idea?
@tomatualus commented on GitHub (Oct 2, 2020):
Hey @StefH,
Logger in
WireMockServicemust be aILogger<WireMockService>And in ConfigureServices you must call
serviceCollection.AddLogging(x => x.AddConsole());for it to be added to DI setup. Hope that works.