Skip to content

XSockets Azure worker role

Uffe Björklund edited this page Jun 15, 2015 · 3 revisions
  1. Create a new Azure Cloud Service project
  2. Choose to add a Worker Role and give it a proper name
  3. Install-Package XSockets -pre to the worker role project
  4. In the worker role project, Select Add -> Nwe Item and then navigate to XSockets.NET v5 and choose AzureWorkerRoleConfig
  5. In the WorkerRole class add private IXSocketServerContainer container;
  6. In the OnStart method add container = Composable.GetExport<IXSocketServerContainer>();
    container.StartOnAzure();
  7. Open the configuration for the worker role and add 2 settings. One named origin and one named uri
  8. Set origin to be * and uri to be ws://replaceme.cloudapp.net:port where replaceme should be replaced with your azure endpoint.
  9. Add a TCP endpoint for the port you want to use.

Note: You can select local/cloud configuration to be able to run on localhost. Note: You should reference the project where your modules/plugins for XSockets is located to get them to Azure.

Clone this wiki locally