14

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?

Sam
  • 28,421
  • 49
  • 167
  • 247

4 Answers4

15

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
David Makogon
  • 69,407
  • 21
  • 141
  • 189
4
  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.
Manoj Attal
  • 2,806
  • 3
  • 28
  • 31
  • You don't need to create a web role for a WCF service; a worker role works fine. – David Makogon Nov 30 '10 at 12:05
  • The example is nice, but uses BasicHttpBinding which is not secure enough for us. And when we try to replace the binding everything falls apart :( – Sam Nov 30 '10 at 12:14
3

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

genuinebasil
  • 93
  • 1
  • 9
  • Any limitation to that? Can I use the Azure Scheduler to call my WCF service hosted into a website to act like a SQL Agent? – Simone Mar 28 '14 at 15:59
0

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.