Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Host WCF Service in Worker Role

In the process of building my first AZURE based application using WCF services I have stumbled across a number of examples where people show how one can host a WCF Service inside a Worker Role.

Such as in these articles:

http://www.codeproject.com/Articles/188464/Host-WCF-Services-in-an-Azure-Worker-Role http://code.msdn.microsoft.com/windowsazure/CSAzureWCFServices-20c7d9c5

Very simple question, can someone please explain what use case would require hosting a WCF service in a worker role? What are the motivation/advantages of doing this?

like image 940
Maxim Gershkovich Avatar asked Jul 23 '13 00:07

Maxim Gershkovich


1 Answers

Hosting a WCF service inside of a WebRole implies that it is hosted within IIS. Some folks prefer to not have the footprint of IIS mess with their ServiceHost and host the service directly. They have more control over how the communication with their service is done without IIS in the middle.

Also, when shrink-wrapping the packaged solution for customers, it is simpler to create an installer package without trying to rely on IIS infrastructure that customers may or may not have properly deployed/configured.

HTH

like image 81
Igorek Avatar answered Nov 14 '22 06:11

Igorek