문제

I've made a basic wcf console app service that communicates over pipes.net. The logic works with my main application, but I need to keep it seperate for business reasons

It does one of these

   Uri baseAddress = new Uri(@"net.pipe://localhost/Server");
   Uri baseHttpAddress = new Uri(@"http://localhost:9080");

   using (var host = new ServiceHost(typeof(CPLConversionService), baseAddress, baseHttpAddress))
   {
       host.Open();
       Console.WriteLine("The CPLConversionService is available. ");

       Console.WriteLine("Press <Enter> to stop the service. ");
       Console.ReadLine();

       host.Close();
    }

Anyway, it is okay to put this up on a web-server and let it run long term? Should I manage it using IIS instead in some form?

도움이 되었습니까?

해결책

Hosting in Windows Service is better for production use for it's autostart feature. Hosting in IIS is easier and gives better maintainability and configuration. IIS with App Fabric gives better monitoring of your service.

See this answer for help with choosing a way of hosting https://stackoverflow.com/a/9823604/2898090

다른 팁

Windows Service is better then console application. You can define start properties for service (user, auto start, dependencies and fault behavior).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top