Azure Worker Role not Running?
I'm new to Azure so this may be something obvious that I'm missing. I created a new Azure Cloud Service project and added a web role and worker role. In the web role I upload a file to blob storage. That part works fine. As part of that that process I added a message to the azure message 开发者_运维技巧queue. In my worker role I'm checking for a message in the queue. The issue is the worker role does not appear to be working. In debug mode I put in a break point and it never gets hit. Is there a step that I am missing that starts the worker role or something?
You need to run the Azure project itself, not the individual roles.
This will start all of the roles in the Azure development fabric.
Can you share the code for your worker role's OnStart() method. One thing I can think of is that your role's OnStart() method is terminating which should not be happening. There should be an infinite loop inside your worker role's OnStart() method inside which you will need to repeatedly call the function which checks the queue status.
If you run the Azure project, it will automatically initiates the roles. If you want to debug, then enable intelli trace and debug your application in development fabric.
精彩评论