Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Want to host WCF Webservice as Windows Service as against to Hosting in IIS

I want to expose few web services but thinking of hosting those as Windows Service as against hosting in IIS.

Is it a good practice?

If yes? How do I make it secured?

I want to authenticate the users who are accessing it (against our custom security database and also want to make sure that the request is originating from our business partner (X.509 certificates???? not worked much with this).

appreciate your pointers in this regards.

Thanks & Regards, Ajay

like image 742
Ajay Avatar asked Oct 21 '08 18:10

Ajay


People also ask

What is difference between Windows service and WCF service?

A windows service is what you need. WCF is a communications library, and unless you plan to communicate with your application via a client, you don't need it. Your problem is related to activation, and keeping your code active in the background is what windows services do.

Can we host Windows service in IIS?

IIS can host services over HTTP protocol, the Windows Activation Service (WAS) can support others such as TCP and named pipes, and self-hosting can support many protocols and includes several deployment options such as console or Windows Forms applications and Windows services.


2 Answers

You might want to read this Microsoft article , which clearly points Pros/cons of each hosting method, including: Console/WinForms App, IIS 6 and 7 (there are differences) and Windows Services.

like image 95
Martin Marconcini Avatar answered Sep 22 '22 13:09

Martin Marconcini


If you are using IIS6, using a Windows Service is a must for many scenarios. Windows Services are 100% supported and a 100% safe way to host WCF. You can secure them with the same options as in IIS.

like image 34
jezell Avatar answered Sep 22 '22 13:09

jezell