mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 08:48:28 +02:00
Updated WireMock as a (Azure) Web App (markdown)
@@ -1,6 +1,13 @@
|
|||||||
It's also possible to run WireMock as a Web-Application on Azure or IIS.
|
It's also possible to run WireMock as a Web-Application on Azure or IIS.
|
||||||
|
|
||||||
|
# References
|
||||||
|
* https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
|
||||||
|
* https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-2.1
|
||||||
|
* https://github.com/WireMock-Net/WireMock.Net/blob/master/examples/WireMock.Net.WebApplication.NETCore3/readme.md
|
||||||
|
|
||||||
# WireMockService
|
# WireMockService
|
||||||
|
|
||||||
|
### Code
|
||||||
See this code example how a App-Service could look:
|
See this code example how a App-Service could look:
|
||||||
|
|
||||||
``` csharp
|
``` csharp
|
||||||
@@ -40,5 +47,21 @@ public class WireMockService : IWireMockService
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Web.Config
|
||||||
|
``` xml
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<!--
|
||||||
|
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
|
||||||
|
-->
|
||||||
|
<system.webServer>
|
||||||
|
<handlers>
|
||||||
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||||
|
</handlers>
|
||||||
|
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
|
```
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
For a full working example, see [examples\WireMock.Net.WebApplication.NETCore3](https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.WebApplication.NETCore3)
|
For a full working example, see [examples\WireMock.Net.WebApplication.NETCore3](https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.WebApplication.NETCore3)
|
||||||
Reference in New Issue
Block a user