Updated WireMock as a standalone process (markdown)

Stef Heyenrath
2018-05-19 08:37:03 +02:00
parent fe7b05b850
commit 4b628cd674

@@ -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#