WCF service over HTTP in an Azure worker role?

↘锁芯ラ 提交于 2019-12-06 04:07:08

A WCF service hosted in a worker role will essentially be self-hosted: From your OnStart(), you'd create a new ServiceHost() and go from there.

A WCF service hosted in a web role would be taking advantage of IIS to host the service, as an svc, taking advantage of IIS performance counters, caching, automatic activation, process recycling, etc.

Even more interesting: In a web role where you host your website, you could still run a self-hosted WCF service the same way as in a worker role. You'll just need to create another input endpoint on some other port (or an internal endpoint, usable by only your Windows Azure web/worker role instances in your deployment).

And yet another scenario: By running a self-hosted service, you're not limited to .net - fire up any executable that knows how to listen to a port. This opens up opportunities to host a Java service host, python, etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!