简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM