0

I've started using Wiremock.Net. The setup is working fine when i run from .NET console application and below is code

        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();

The server is working fine http://localhost:8081/__admin/mappings and mappings are in bin\Debug\__admin\mappings

I want to make this console is always running and i applied same like this .NET console application as Windows service. When i start Windows Service and browse http://localhost:8081/__admin/mappings it just returns []

Prasad Kanaparthi
  • 6,423
  • 4
  • 35
  • 62

1 Answers1

0

See this WireMock.Net wiki page which describes how to run WireMock as a Windows Service.

For a full working example which also provides an Installer and batch-files to

  • Install
  • Start
  • Stop
  • Uninstall

the service, see examples/WireMock.Net.Service

Stef Heyenrath
  • 9,335
  • 12
  • 66
  • 121