0

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?

Bhupendra Shukla
  • 3,814
  • 6
  • 39
  • 62
monkeyhouse
  • 2,875
  • 3
  • 27
  • 42
  • Yes, login over RDP, copy and run. Why not? Or make it a windows service, this would be the correct approach. – abatishchev Feb 25 '14 at 04:18
  • See question and answer - [Regarding wcf service hosting](http://stackoverflow.com/a/13094635/596688) – Sergey Feb 25 '14 at 05:51

2 Answers2

1

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

Community
  • 1
  • 1
Ruslan
  • 126
  • 1
  • 3
0

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

Vasiliy
  • 492
  • 3
  • 11