14
votes

I got a wcf service which I'd like to run on azure, but I got several problems:

First: do I choose a web role or a worker role for running the wcf service?

Second: The client uses a call to log into the service, afterwards the service should remember who is logged in (sessions). The problem is, for firewall reasons I probably should use some http-binding. But these seem not to support sessions??
Or do I need AppFabric for sessions (what is AppFabric anyway?)?

Is there a good complete tutorial how to host wcf service?

4

4 Answers

15
votes

If you host your WCF service in a Web role, you'll then have all the benefits of IIS (pooling, caching, logging, etc.). You can rely on the WCF Web Role template and simply add a WCF service (which manifests itself as an svc) - and with the new SDK 1.3, you should be able to host a WCF service alongside your website in the same role.

You can also new up a ServiceHost in a worker role. With the worker role, you'll have complete control, but you'll lose the benefits of IIS.

For WCF labs, start with the Azure Platform Training Kit. You'll see labs for:

  • Hosting WCF in a worker role
  • Using identity management for WCF security
  • Using WCF with the service bus
4
votes
  1. You will need to create web role for WCF service.
  2. Here is a good tutorial on hosting wcf service on azure. I followed it and I could host a service on azure.
  3. AppFabric is like a bus, which you can use for user authentication or getting some data from azure application.
3
votes

You can even host your WCF service on Azure Websites instead of using Web role or worker role. See the details here.

0
votes

there´s no right answer for every scenario. if your service is simple, and dont need to manage a lot of configurarions such as specific permissions and etc, the azure website may attend well.