Web role = Worker role + IIS

It surprised me to find that the ‘Run’ method on your implementation of  ‘RoleEntryPoint’ gets called on Azure Web Roles, in just the same way as Worker Roles.

public class WebRole : RoleEntryPoint
{
  public override void Run()
  {
      // Do something
  }
}

This means that if you have currently have separate web roles and worker roles, you could combine these into a single role. The advantage with this approach is that load will then be spread evenly across all of your instances, and you make better use of the compute time you’ve purchased.

What is also interesting, is that run is called on a copy of your assembly in this folder:

e:\approot\bin

Whereas IIS is pointing to another copy of your application in this folder:

e:\siteroot\0