This example shows how you can consolidate several separate and distinct tasks into a single worker role.
Running the Example
You can run this example locally in the Visual Studio Windows Azure emulator. You can also run this example by deploying it to a Windows Azure Cloud Service.
- Start Visual Studio using an account that has Administrator privileges ("Run as Administrator").
- Open the solution you want to explore from the subfolders where you downloaded the examples.
- Right-click on each role in Solution Explorer, select Properties, and ensure that the role is configured to generate diagnostic information.
- If you want to run the example in the local Windows Azure emulator:
- Press F5 in Visual Studio to start the example running.
- Open the Windows Azure Compute Emulator UI from the icon in the notification area.
- Select each role in turn and view the diagnostic information generated by Trace statements in the code.
- If you want to run the example on Windows Azure:
- Provision a Windows Azure Cloud Service and deploy the application to it from Visual Studio.
- Open the Server Explorer Window in Visual Studio and expand the Windows Azure entry.
- Expand Cloud Services and then expand the entry for the solution you deployed.
- Right-click each role instance and select View Diagnostics Data to see the diagnostic information generated by Trace statements in the code. This is written to the WADLogsTable in the Storage/Development/Tables section.
For further details about the sample, see the Readme and Release Notes included with the zip file.
For more information about the pattern, see the
Compute Resource Consolidation Pattern on MSDN.