diff --git a/WireMock-as-a-standalone-process.md b/WireMock-as-a-standalone-process.md index 8d26de2..c0f6547 100644 --- a/WireMock-as-a-standalone-process.md +++ b/WireMock-as-a-standalone-process.md @@ -1,6 +1,13 @@ -## WireMock as a standalone process +# WireMock as a standalone process This is quite straight forward to launch a mock server within a console application. +## Workaround for Microsoft.Owin.Host.HttpListener exception +Note that when using WireMock in a **NET 4.5x**, **NET 4.6.x** project, you can get this exception when running your console application: + +> Unhandled Exception: System.Exception: Service start failed with error: The server factory could not be located for > the given input: Microsoft.Owin.Host.HttpListener ---> System.MissingMemberException: The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener + +The solution is to add the `Microsoft.Owin.Host.HttpListener` NuGet package to your hosting console application. + ### Option 1 : using the WireMock.Net.StandAlone library. (https://www.nuget.org/packages/WireMock.Net.StandAlone/) ```c#