我已开始使用Wiremock.Net。当我从.NET控制台应用程序运行时,设置工作正常,下面是代码
var server = FluentMockServer.Start(new FluentMockServerSettings
{
Urls = new[] { "http://+:8080", "http://localhost:8081/" },
StartAdminInterface = true,
ReadStaticMappings = true,
});
Console.WriteLine("Press any key to stop the wire mock fake server");
Console.ReadLine();
server.Stop();
服务器工作正常http://localhost:8081/__admin/mappings
,映射位于bin\Debug\__admin\mappings
我想让这个控制台一直在运行,我也是这样应用的
.NET console application as Windows service。当我启动Windows服务并浏览http://localhost:8081/__admin/mappings
时,它只返回[]
答案 0 :(得分:0)