Azure Worker Role
It is really easy to setup deploy your XSockets solution to a Azure Worker Role.
You have to have the Azure SDK installed
Create the project
Select a new
Cloud project and choose
I renamed the worker role to
Install the XSockets package from nuget
Add the template for worker role startup
Add a new item from the XSockets.NET 5 templates and select the
First of all add a new field to the WorkerRole class to hold the IXSocketServerContainer.
private IXSocketServerContainer container;
Then add these lines in the
container = Composable.GetExport<IXSocketServerContainer>(); container.StartOnAzure();
To be able to start the XSockets server in the worker role we have to add some configurations.
Replace the "marked" part with the name of your cloudservice so that you have "nameOfYourService.cloudapp.net"
Also add a new endpoint to decide what port to use, I choose port 8080
Now just deploy the service to Azure where the name of the service should match your configuration. Remember to reference any assemblies you have with XSockets modules as well as adding the license as shown under "The Basics/Add the license".