mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-18 07:00:04 +02:00
Updated WireMock as a standalone process (markdown)
@@ -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.
|
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.
|
### Option 1 : using the WireMock.Net.StandAlone library.
|
||||||
(https://www.nuget.org/packages/WireMock.Net.StandAlone/)
|
(https://www.nuget.org/packages/WireMock.Net.StandAlone/)
|
||||||
```c#
|
```c#
|
||||||
|
|||||||
Reference in New Issue
Block a user