Worker role in Azure with HttpListener, deployment failed

I created a new worker role for a websocket server. But when I would deployed to Azure an error accoured, I did not get any message in Visual Studio but when I opend the Azure portal I found an message that told me that a HttpListenerException occoured. My first thought was that it was a conflict with the port that the worker listened at. But I tried other ports and same result. After som researched I found that the worker was not allowed to register HttpListener.

The solution was to add <Runtime executionContext="elevated" /> to the ServiceDefinition. When I deployed the worker after adding it the deploy was successful.


  7/12/2013 - 1:59 PM